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

Optimize excluded items #1152

Merged
merged 6 commits into from
Dec 3, 2023
Merged

Optimize excluded items #1152

merged 6 commits into from
Dec 3, 2023

Conversation

qarmin
Copy link
Owner

@qarmin qarmin commented Dec 3, 2023

  • Optimize excluded items by avoiding allocations in function regex_check executed almost for every file(clock count of this function decreased from 6% to 3%)
  • Fixes problem when sometimes wildcards were not properly recognized
  • Big speedup when checking for big number of empty folders (btw - don't use BTreeMap<Pathbuf, X> when you are using a lot of .get() or .get_mut(), because comparison Pathbuf is very slow - sometimes better is to use HashMap<Pathbuf, X> and at the end converting it to BTreeMap)
  • Collecting files for scan can be a lot of faster due lazy file metadata gathering
  • Fix not selecting non accessible folder as non-empty

Before empty folders (~58s)

Screenshot from 2023-12-03 19-02-40

After(~4ms)

Screenshot from 2023-12-03 19-13-28

@qarmin qarmin merged commit 51198c2 into master Dec 3, 2023
34 checks passed
@qarmin qarmin deleted the optimize_excluded_items branch December 3, 2023 20:18
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