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

Improve performance by combining filepath.Walk and checksum calculation #3

Closed
rtfmkiesel opened this issue May 10, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@rtfmkiesel
Copy link
Owner

Instead of getting a list of files first and then calculate the checksums, calculate and compare the checksums when filepath.Walk is used.

@rtfmkiesel rtfmkiesel added the enhancement New feature or request label May 10, 2023
@rtfmkiesel rtfmkiesel self-assigned this May 10, 2023
rtfmkiesel added a commit that referenced this issue May 14, 2023
FileWalker results -> channel (GH-3)
Removed IsAdmin since it was only needed once
@rtfmkiesel
Copy link
Owner Author

The default folder scan went down from ~2.3s to ~0.84s on my machine. This was achieved by:

  • Parsing found files directly to the checksum calculator rather than waiting for all found files
  • Comparing the checksums right after calculation instead of passing them of to another go func

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant