racorn edited a comment on issue #6414: High CPU load when PulsarClient (Java) 
is idle
URL: https://github.com/apache/pulsar/issues/6414#issuecomment-592933365
 
 
   I wish I had seen this before: netty/netty#9710, and the fix netty/netty#9714
   
   As the Netty version is now bumped to 4.1.45 on master, the CPU load is no 
longer an issue on Windows. 
   
   Anyway, @jiazhai, I made the suggested implementation in my forked 
repository, you can have a look to see if it is of any value. I could be an 
improvement in the `ProducerImpl`, where 
`client.scheduledExecutorService().scheduleAtFixedRate` better reflects what 
you want to achieve than using a `Timeout`. Also, the `keyGeneratorTask` could 
use the `ScheduledExecutorService` instead of using the Netty eventLoopGroup. 
On the other hand, if you are producing messages for a huge number of topics 
(10k +), the `HashedWheelTimer` may perform better. So maybe it is better to 
leave it as it is.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to