GNOME Bugzilla – Bug 700238
Initialize brokers asynchronously
Last modified: 2016-03-31 13:22:00 UTC
Opening a separate bug for: https://bugzilla.gnome.org/show_bug.cgi?id=683489#c46 https://bugzilla.gnome.org/show_bug.cgi?id=683489#c47
Let's not miss the useful info... Christophe Fergeau 2013-05-02 18:58:30 UTC Review of attachment 240755 [details] [review]: ::: src/app.vala @@ +419,3 @@ + + foreach (var source in new_sources) + yield add_collection_source (source); I'm afraid serializing the add_collection_source() call is not very good. add_collection_source() fetches all the VMs available from source and adds them to the UI. This can take quite some time with remote sources. If the various calls are serialized, this means if a slow source is handled before a fast sourcee, then the VMs from the faster source won't show up until the slow source is done fetching its VMs. Using add_collection_source().begin() was more correct imo. [reply] [-] Comment 47 Zeeshan Ali (Khattak) [gnome-boxes developer] 2013-05-02 21:12:19 UTC Review of attachment 240755 [details] [review]: ::: src/app.vala @@ +419,3 @@ + + foreach (var source in new_sources) + yield add_collection_source (source); The check for default_connection that follows needs to wait for all connections/sources to be added (at least until default connection is not available). I think add_collection_source() does not necessarily need to do fetch all VMs etc and it should launch things async as appropriate to return as quickly as possible. Alternative would be: var i = 0; foreach (var source in new_sources) add_collection_source.begin (source, (o, res) => { add_collection_source.end (o, res); i++; if (i == new_sources.length) // Check for default_connection availability goes here });
*** Bug 747925 has been marked as a duplicate of this bug. ***
*** Bug 744002 has been marked as a duplicate of this bug. ***
commit: 4db7e474872197e65e896bd9f9f5d5d8c9ec468d app: Asynchronously setup non-default sources In case of remote sources, we do not know how long they can take and it has been reported that at least in case of libvirt sources, Boxes can hang on startup for a long time if such sources are unreachable.