Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

feat(scanner): generate hash concurrently #1958

Merged
merged 3 commits into from
Jul 26, 2024
Merged

feat(scanner): generate hash concurrently #1958

merged 3 commits into from
Jul 26, 2024

Conversation

paralta
Copy link
Contributor

@paralta paralta commented Jul 25, 2024

Description

  • Add test to verify hash computed is the same
  • Use Mapper from github.com/sourcegraph/conc/iter to concurrently generate hashes for files

Time to generate hash for a 8GB directory decreased from 12 seconds to 3 seconds.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@paralta paralta added go Pull requests that update Go code scanners Issues related to adding new scanners labels Jul 25, 2024
@paralta paralta self-assigned this Jul 25, 2024
@paralta paralta requested a review from a team as a code owner July 25, 2024 13:42
scanner/utils/hash.go Outdated Show resolved Hide resolved
scanner/utils/hash.go Outdated Show resolved Hide resolved
@paralta paralta added this pull request to the merge queue Jul 26, 2024
Merged via the queue into main with commit d531b93 Jul 26, 2024
17 checks passed
@paralta paralta deleted the gen-hash branch July 26, 2024 11:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
go Pull requests that update Go code scanners Issues related to adding new scanners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants