Validate with cheap methods before running check#57
Closed
ben-grande wants to merge 2 commits into
Closed
Conversation
Faster than checking if domain is running. For: QubesOS/qubes-issues#10569 For: QubesOS/qubes-issues#9902
Contributor
Author
|
Superseded by QubesOS/qubes-core-admin#819 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For: QubesOS/qubes-issues#10569
For: QubesOS/qubes-issues#9902
I haven't tested this yet. I am implictly relying that
untrusted_qdbdoes the checkis_running()if it's empty.On other places, use cheaper methods like key in dictionary before even checking if domain is running. This is important for the loop through all domains.
I will use cProfile to test if there are improvements and if less calls are made to
is_running().To reduce even more the number of calls, I'd like to change this: https://github.com/QubesOS/qubes-core-admin/blob/18afb70d78afabb7ca9da90a7579138318caa4d0/qubes/vm/qubesvm.py#L1088, from
is_running()to something else, maybe without relying on libvirt.