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

feat: support parallel hash computing #29

Merged
merged 6 commits into from
Jul 19, 2023
Merged

Conversation

flywukong
Copy link
Collaborator

@flywukong flywukong commented Jul 12, 2023

Description

support parallel hash computing before creating object in the client .
The function will utilize multiple threads based on the number of CPU cores of the user's operating system. Considering that the client's computing capability may be limited, the function currently limits the maximum concurrent threads to 5.

test result (mac OS with 6 cpu core ):

file size less than 16M:
serial computing hash cost time: 92 ms
parallel computing hash cost time: 88 ms

file size 100M:
serial computing hash cost time: 710 ms
parallel computing hash cost time: 211 ms

file size 500M:
serial computing hash cost time: 3439 ms
parallel computing hash cost time: 898 ms

file size 1G:
serial computing hash cost time: 12378 ms
parallel computing hash cost time: 2378 ms

Rationale

support computing hash of larger file by a parallel way

Example

NA

Changes

Notable changes:

  • support parallel hash

@flywukong flywukong changed the title feat : support parallel hash computing feat: support parallel hash computing Jul 12, 2023
Copy link
Contributor

@sysvm sysvm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@flywukong flywukong merged commit a9545a9 into develop Jul 19, 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.

3 participants