~dandrader/qtmir/coordinateTranslator

Viewing all changes in revision 538.

  • Committer: Bileto Bot
  • Author(s): Gerry Boland
  • Date: 2016-07-30 21:19:59 UTC
  • mfrom: (520.4.2 improve-app-startup-speed)
  • Revision ID: ci-train-bot@canonical.com-20160730211959-otobctvcly6zsamj
AppMan: queue the onProcessStarting slot, as processStarting blocks ubuntu-app-launch from executing the process.

The ProcessStarting signal is fired by a sync dbus call from upstart via ubuntu-app-launch. It is a sync call as AppMan needs to be informed of a new process, before that process can connect through Mir and be authenticated with authoriseSession (it was async before, but we had to make it sync to fix a bug where fast starting processes would connect to Mir before upstart's signal was received).

Instead of reacting immediately in the onProcessStarted - creating the Application & emitting signals to shell (which causes animations) -all blocking upstart launching the app, it is better to push an event onto the event queue and let upstart launch the app.

Note that authoriseSession is a slot connected to with a BlockingQueuedConnection, which also creates an event and pushes it to the event queue. As this will definitely happen after the processStarted signal, we are guaranteed that the slots will be called in the correct order.

This change improves app startup times on Krillin by around 100ms.

Approved by: Daniel d'Andrada

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: