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

Implements Netty Thread-local object pool for Command #72

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

tuhuynh27
Copy link
Member

Command now will be reused, fixes #69

@tuhuynh27 tuhuynh27 added the enhancement New feature or request label Dec 13, 2021
@tuhuynh27 tuhuynh27 added this to the RC Release milestone Dec 13, 2021
@tuhuynh27 tuhuynh27 self-assigned this Dec 13, 2021
@tuhuynh27 tuhuynh27 linked an issue Dec 13, 2021 that may be closed by this pull request
@tuhuynh27 tuhuynh27 changed the title Implements Netty Thread-local object pool for Command Implements Netty Thread-local object pool for Command & String intern Dec 13, 2021
@tuhuynh27
Copy link
Member Author

Copy link
Member

@yampml yampml left a comment

Choose a reason for hiding this comment

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

Okay

@axblueblader
Copy link
Member

axblueblader commented Dec 14, 2021

https://stackoverflow.com/questions/10624232/performance-penalty-of-string-intern

From the post answers, looks like it degrades heavily when the number of distinct string increase, can u explain a bit why we should use string.intern()? All the parameter/argument strings are very likely to be distinct.

@tuhuynh27
Copy link
Member Author

tuhuynh27 commented Dec 14, 2021

Sure @axblueblader, like what you said, I'm considering to revert the commit, not to use .intern()

@tuhuynh27 tuhuynh27 changed the title Implements Netty Thread-local object pool for Command & String intern Implements Netty Thread-local object pool for Command Dec 14, 2021
@tuhuynh27
Copy link
Member Author

Regarding the Object Pool, we will release the object right after done processing Command, for AOF mode, will release after the command is flushed to disk (batches)

@tuhuynh27 tuhuynh27 merged commit 43f61e0 into develop Dec 16, 2021
@tuhuynh27 tuhuynh27 deleted the feature/object-pool branch December 16, 2021 14:38
@tuhuynh27 tuhuynh27 mentioned this pull request Dec 16, 2021
tuhuynh27 added a commit that referenced this pull request Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ByteArray pool allocator && String pool
3 participants