Merge lp://staging/~ted/ubuntu-app-launch/prestart-reshuffle into lp://staging/ubuntu-app-launch/14.10

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 175
Merged at revision: 166
Proposed branch: lp://staging/~ted/ubuntu-app-launch/prestart-reshuffle
Merge into: lp://staging/ubuntu-app-launch/14.10
Prerequisite: lp://staging/~ted/ubuntu-app-launch/tracepoint-cleanup
Diff against target: 1391 lines (+362/-351)
15 files modified
CMakeLists.txt (+0/-20)
click-exec-trace.tp (+0/-56)
desktop-exec-trace.tp (+0/-38)
libubuntu-app-launch/CMakeLists.txt (+4/-0)
libubuntu-app-launch/click-exec.c (+15/-41)
libubuntu-app-launch/click-exec.h (+25/-0)
libubuntu-app-launch/desktop-exec.c (+10/-45)
libubuntu-app-launch/desktop-exec.h (+24/-0)
libubuntu-app-launch/ubuntu-app-launch-trace.tp (+88/-0)
libubuntu-app-launch/ubuntu-app-launch.c (+34/-18)
tests/CMakeLists.txt (+0/-3)
tests/exec-util-test.cc (+47/-16)
tests/libual-test.cc (+115/-110)
upstart-jobs/application-click.conf.in (+0/-2)
upstart-jobs/application-legacy.conf.in (+0/-2)
To merge this branch: bzr merge lp://staging/~ted/ubuntu-app-launch/prestart-reshuffle
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+231811@code.staging.launchpad.net

Commit message

Reshuffle the pre-start jobs to save precious milliseconds

Description of the change

This is a reshuffling branch, I've tried to simplify some to make the merge easier to read, but I'm afraid I haven't been completely successful there. In essence the two prestart utilities, click-exec and desktop-exec, have been merged into the libual library. What this does is put all of the environment processing into the library start command and make for a single set of the environment variables to Upstart with the Start invocation. It also saves starting an additional process. All in all, this ends up saving about 20-40ms of application startup time depending on how you measure.

Unfortunately that seriously effected the libual test suite in that it now is opening the click database for almost all start transactions, so that test system had to be made coherent for all of those tests, not just the exec tools. Which meant refactoring teh click database some. Sorry.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

This refactor makes a lot of sense; the diff looks terrible in LP but since most of it is just code moving from location A to B it's actually much smaller than it seems.

Glad to see report_recoverable_problem() making it into the public API! I can remove the copy from indicator-session now.

One minor wart, in libual-test.cc, hanging the app-id caused the same strings to be replaced dozens of times... a good sign that they should be constexpr'ed or #define'ed somewhere instead. This is more bikeshed than blocker; feel free to ignore. :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches