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

Optimized and refactored fm_get_directorysize() function #720

Merged
merged 1 commit into from
Feb 12, 2022

Conversation

michael-milette
Copy link
Contributor

Also added validation.

@michael-milette
Copy link
Contributor Author

Also added validation in addition to optimizing and refactoring the fm_get_directorysize() function.

While the performance increase on Linux is only about 3%, it is 20% to 25% on Windows when tested on a directory structure containing 44,381 files and 12,618 folders for a total of about
2.1 GB.

Notes:

  • The function no longer ever returns 'Folder'. This is unnecessary as 'Quick output' mode is handled before the function call.
  • Testing for directory vs files is not required since we are now skipping dots.
  • The function returns 0 if the directory does not exist.

Let me know if you have any questions or concerns.

Best regards,

Michael Milette

@prasathmani prasathmani merged commit 9b2bb18 into prasathmani:master Feb 12, 2022
@michael-milette
Copy link
Contributor Author

Thank you @michael-milette !

@michael-milette michael-milette deleted the patch-1 branch February 12, 2022 22:22
ner00 pushed a commit to ner00/tinyfilemanager that referenced this pull request May 7, 2023
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.

2 participants