-
Notifications
You must be signed in to change notification settings - Fork 994
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
Reduce RedisStateMachine bytecode size #1323
Comments
before ➜ jitwatch-1.3.0 ./jarScan.sh --mode=maxMethodSize --limit=325 --packages=io.lettuce.core.protocol ~/code/github/lettuce-core/target/classes
"io.lettuce.core.protocol","RedisStateMachine","decode","io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",571 after ➜ jitwatch-1.3.0 ./jarScan.sh --mode=maxMethodSize --limit=5 --packages=io.lettuce.core.protocol ~/code/github/lettuce-core/target/classes|grep -F RedisStateMachine
"io.lettuce.core.protocol","RedisStateMachine","loopPeekStack","io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",127
"io.lettuce.core.protocol","RedisStateMachine","decode","io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",109
"io.lettuce.core.protocol","RedisStateMachine","funcMulti","io.lettuce.core.protocol.RedisStateMachine,io.lettuce.core.protocol.RedisStateMachine$State,io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",100
"io.lettuce.core.protocol","RedisStateMachine","funcBulk","io.lettuce.core.protocol.RedisStateMachine,io.lettuce.core.protocol.RedisStateMachine$State,io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",75
"io.lettuce.core.protocol","RedisStateMachine","funcInteger","io.lettuce.core.protocol.RedisStateMachine,io.lettuce.core.protocol.RedisStateMachine$State,io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",42
"io.lettuce.core.protocol","RedisStateMachine","funcSingle","io.lettuce.core.protocol.RedisStateMachine,io.lettuce.core.protocol.RedisStateMachine$State,io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",39
"io.lettuce.core.protocol","RedisStateMachine","funcBytes","io.lettuce.core.protocol.RedisStateMachine,io.lettuce.core.protocol.RedisStateMachine$State,io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",32
"io.lettuce.core.protocol","RedisStateMachine","funcError","io.lettuce.core.protocol.RedisStateMachine,io.lettuce.core.protocol.RedisStateMachine$State,io.netty.buffer.ByteBuf,io.lettuce.core.protocol.RedisCommand<?, ?, ?>,io.lettuce.core.output.CommandOutput<?, ?, ?>",28 |
Can you explain the motivation behind this change? |
I'm working on a business project now. In my project, I need a fast 3rd lib to access redis. I may use some asynchronous scenarios. What I compared I captured the thread dump. Found My motivation is let
|
Thanks a lot. I'll have a look. |
That's merged now. |
Describe the solution you'd like
the method,
decode()
, inRedisStateMachine
is so big. When convert it to bytecode, the size is great than 325 bytes.Describe alternatives you've considered
using enum with behavior + lambda, we can reduce the method's size.
Teachability, Documentation, Adoption, Migration Strategy
JitWatch
The text was updated successfully, but these errors were encountered: