sync dbus call from unity to place daemons on startup
Bug #618545 reported by
Mikkel Kamstrup Erlandsen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Unity |
Fix Released
|
High
|
Neil J. Patel | ||
unity (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When Unity starts up it does synchronous dbus calls to the place daemons to initialize with dbus activation. This is very bad as the place daemons does loads of IO on startup - hence will be slow to respond if they are not already running.
I actually had a quick stab at this a while ago, but gave up because it seemed to be quite a big patch. As far as I know - in order to do async dbus calls with Vala you need to declare an interface for the remote end with 'async' modifiers on the methods, and then cast your proxy object to that interface. For an example see: http://
Related branches
lp:~unity-team/unity/async-places
- Mikkel Kamstrup Erlandsen (community): Approve
-
Diff: 322 lines (+129/-71)3 files modifiedunity-private/places/places-place-entry.vala (+29/-4)
unity-private/places/places-place-search-navigation.vala (+53/-28)
unity-private/places/places-place.vala (+47/-39)
Changed in unity: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in unity: | |
assignee: | nobody → Neil J. Patel (njpatel) |
milestone: | none → 2010-09-02 |
status: | Confirmed → Triaged |
tags: | added: places |
Changed in unity: | |
status: | Fix Committed → Fix Released |
Changed in unity (Ubuntu): | |
status: | New → Fix Released |
To post a comment you must log in.
So, the place entry and the browser navigation have been moved to be completely async. The startup, however, needed to be moved to a idle call to refresh the entries. The reason for this is that vala cannot marshal the PlaceEntryInfo struct correctly on the client side, it leaves out the entry renderer informaton which makes other things stop working.
Moving to an idle means that we're not blocking there initially. We could even move it to a timeout as it's not completely important to sync right away, though that would need much more thorough testing. I'm marking as fix-committed as this is the best I can do right now. The actual opening/searching etc of places has sped up on my machine.
I left the activation api sync for now, as making it async had weird effects on when unity would dismiss when clicking on an icon. I'm still not happy with that, I just need to figure out how to do it properly.