Skip to content

Speed up device query#852

Draft
ben-grande wants to merge 7 commits into
QubesOS:mainfrom
ben-grande:cache-devices
Draft

Speed up device query#852
ben-grande wants to merge 7 commits into
QubesOS:mainfrom
ben-grande:cache-devices

Conversation

@ben-grande

@ben-grande ben-grande commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This PR was split from #819 and it does not contain commits that should be problematic (more tested), those were left out to #855.

TODO:

  • fix tests

@ben-grande
ben-grande marked this pull request as draft July 23, 2026 15:40
@ben-grande ben-grande changed the title [WIP] Cache devices Cache devices Jul 23, 2026
Each call was recording 1ms, now the calls are below that.
This function reimports the same information over and over and is time
consuming when looping through multiple domains. Reduce listing USB
devices while there is no cache from 2.8s to 0.5s.
Method 'startwith' adds considerable overhead.
Libvirt API can be quite slow on the methods for "listAllDevices" and
"XMLDesc", aggravated in loops.
@ben-grande ben-grande mentioned this pull request Jul 24, 2026
Although it doesn't help reduce the time to get the XML, as XMLDesc() is
super slow, this helps cleanup the code a bit.
@ben-grande ben-grande changed the title Cache devices Speed up device query Jul 24, 2026
@ben-grande
ben-grande marked this pull request as ready for review July 24, 2026 13:48
@ben-grande
ben-grande marked this pull request as draft July 24, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant