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

directories: avoid full sort #19

Closed
yarikoptic opened this issue Nov 18, 2020 · 1 comment · Fixed by #71
Closed

directories: avoid full sort #19

yarikoptic opened this issue Nov 18, 2020 · 1 comment · Fixed by #71
Labels
enhancement New feature or request performance Improve performance of an existing feature

Comments

@yarikoptic
Copy link
Member

as initially briefly discussed in #11 (comment)

worth looking into how git does it as well

my guess (didn't try) that until we add support for #5 etc, it might just work without sort?

@yarikoptic yarikoptic added enhancement New feature or request performance Improve performance of an existing feature labels Nov 18, 2020
@jwodder
Copy link
Member

jwodder commented Nov 18, 2020

I suspect (but can't find any explicit confirmation of, and separate confirmations would be required for every filesystem type) that the order of the items returned by scandir() only changes when there's a change to an entry somewhere in the directory tree, in which case it's likely that the fingerprint would change anyway. If that's true, then the code should work automatically without sort(). Additionally, ignoring files without sort() would only lead to problems if a change to an ignored file can cause the relative ordering of non-ignored files to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Improve performance of an existing feature
Projects
None yet
2 participants