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

feature: optimize decodeLogRecord memory usage #292

Closed
wants to merge 2 commits into from

Conversation

Orlion
Copy link

@Orlion Orlion commented Oct 20, 2023

Optimize memory usage of decodeLogRecord using recordPool
Remove slice copy

@roseduan
Copy link
Collaborator

Thanks, but I think we can not use the record Pool because we will return the value from it.
And then the record will be reused in the pool, which may cause data inconsistency.

@Orlion
Copy link
Author

Orlion commented Oct 26, 2023

Thanks, but I think we can not use the record Pool because we will return the value from it. And then the record will be reused in the pool, which may cause data inconsistency.

I removed recordPool.Put in some places to avoid data inconsistency, and in other places LogRecord has been copied out before Putting it back to the recordPool, so I think there is no problem of data inconsistency now. Please review again, Thanks.

@roseduan roseduan closed this Feb 23, 2024
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.

None yet

2 participants