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

Reuse BytesBuffer in BinlogParser #644

Merged
merged 3 commits into from
Nov 11, 2021
Merged

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Nov 11, 2021

to avoid reallocation of buffer and grow slice inside this buffer every time

although, in our bench test, reusing buf don't contribute much, about 1% CPU(by gc)

@D3Hunter
Copy link
Contributor Author

@lance6716 PTAL

replication/parser.go Outdated Show resolved Hide resolved
@lance6716 lance6716 merged commit 2219281 into go-mysql-org:master Nov 11, 2021
@D3Hunter D3Hunter deleted the reuse-buf branch November 11, 2021 09:41
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