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

Stefan BrĂ¼ns noreply at phabricator.kde.org
Wed Jul 17 17:41:11 BST 2019


bruns added a comment.


  In D22333#496544 <https://phabricator.kde.org/D22333#496544>, @davidedmundson wrote:
  
  > Kinda, you're summary missing a key part.
  >  (the commit description is a bit poor)
  >
  > This patch does the following:
  >
  > - It does the search in the other thread. That creates and iterates every possible device. This is expensive as there are lots of potential devices. We fetch pretty much everything udisks knows.
  > - From the given list we recreate the select few devices that are relevant. This is relatively cheap. It does still block as you point out, but now for a much much smaller set of objects compared to before.
  >
  >   (on my laptop that's 56 devices created when searching, resulting in 8 useful devices).
  
  
  Just for clarification:
  
  On my system, `solid-hardware5 list` returns 77 devices, but with the Predicate Filter I am down to 10, and this is filtered by the hotplug engine down to 7.
  
  Half of the devices (32) are serial ports. These are returned by the udev backend, but when combined with the "Camera | PortableMediaPlayer" predicate, the udev backend returns an empty list and nothing is instantiated.
  
  The enumeration in the udev backend, especially 'PortableMediaPlayer' has become much cheaper since https://phabricator.kde.org/D21379.
  
  The Udisks backend indeed returns to much, and unfortunately it creates a backend device for each block device, which implies a number of DBus roundtrips. But this would come down to a single DBus call when D19677 <https://phabricator.kde.org/D19677> lands.

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/20190717/ee259fc8/attachment.html>


More information about the Plasma-devel mailing list