Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't recurse infinitely into subdirectories #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EbonJaeger
Copy link
Member

@EbonJaeger EbonJaeger commented Sep 5, 2023

This fixes the issue where potentially the entire /usr/lib tree is added to the state map, adding hundreds of thousands of entries. This attempts to only recurse one subdirectory to try to match what the C usysconf did.

With this commit, a first run only adds roughly 6200 entries. Still far higher than previous usysconf's 400, but at least it doesn't choke on a second run. I suspect a lot of that might also be due to the new triggers.

@EbonJaeger EbonJaeger added the bug Something isn't working label Sep 5, 2023
This fixes the issue where potentially the entire /usr/lib tree is added to the state map, adding hundreds of thousands of entries. This attempts to only recurse one subdirectory to try to match what the C usysconf did.

With this commit, a first run only adds roughly 6200 entries. Still far higher than previous usysconf's 400, but at least it doesn't choke on a second run.

Signed-off-by: Evan Maddock <[email protected]>
@EbonJaeger
Copy link
Member Author

According to Ikey, the legacy usysconf only stores the glob matches in the state. Should we do the same instead of walking file trees for possibly no reason?

@silkeh
Copy link
Member

silkeh commented Sep 11, 2023

According to Ikey, the legacy usysconf only stores the glob matches in the state. Should we do the same instead of walking file trees for possibly no reason?

Yes, that makes senses to me. @livingsilver94: opinions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants