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

[WIP] Speedup sync #12

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

[WIP] Speedup sync #12

wants to merge 5 commits into from

Conversation

Elbandi
Copy link

@Elbandi Elbandi commented May 27, 2018

Go routine in Sync method reads the file byte-to-byte in rolling mode. thats very slow.
I rewrite the whole func to a different solution: it reads block (current 16) to memory, and do the rolling search in that data. if not enough data in buffer, it copy the remaining data to the begin, and fill the buffer again.
(Block size is configurable)

This PR is just a work-in-progress pull, no need to merge. Any suggestions or ideas are welcome. :)

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.

1 participant