D22333: Move Solid::Device::listFromQuery calls to a separate thread

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Jul 16 15:28:51 BST 2019


bruns added a comment.


  In D22333#494852 <https://phabricator.kde.org/D22333#494852>, @anthonyfieroni wrote:
  
  > https://phabricator.kde.org/source/solid/browse/master/src/solid/devices/frontend/devicemanager.cpp$301
  >  @bruns, It's backend per thread
  
  
  Yes, you are correct, so there are no threading issues, sorry.
  
  On the other hand, this IMHO makes this approach even less profitable:
  
  1. every backend is initialized once from the two helpers (assuming both dataengines are used).
  2. after the threads finish, all but the relevant UDIs are thrown away (and care must be taken not to use anything else - the devices would be dangling pointers in the now gone thread storage)
  3. the first completing thread triggers the initialization of the backends again - in the main thread.
  
  As the initialization happens implicitly by the Device instantiation, for e.g. UDisks there are two synchronous DBus calls now, one for introspection from the manager backend and one for the device itself from the device backend. Both are done in the main thread, and we will block even longer.
  
  So any gain here is AFAICS from the fact the constructor no longer blocks on a DBus call.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D22333

To: apol, #plasma, davidedmundson, bruns
Cc: anthonyfieroni, bruns, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190716/330006a9/attachment.html>


More information about the Plasma-devel mailing list