Skip to content

Don't recurse infinitely into subdirectories#15

Open
EbonJaeger wants to merge 1 commit into
masterfrom
no-recurse-subdirs
Open

Don't recurse infinitely into subdirectories#15
EbonJaeger wants to merge 1 commit into
masterfrom
no-recurse-subdirs

Conversation

@EbonJaeger
Copy link
Copy Markdown
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 <maddock.evan@vivaldi.net>
@EbonJaeger
Copy link
Copy Markdown
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
Copy Markdown
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