orpiske commented on issue #414:
URL: 
https://github.com/apache/camel-kafka-connector/issues/414#issuecomment-687322786


   Today I did play a bit with this and I think we may have some room to 
improve the CamelSourceTask.
   
   I adjusted the code a little bit and managed to reduce both the CPU usage 
(from ~9% to ~0.4% on this computer), GC allocations and heap usage (from 
~350Mb to ~290Mb) while idle. 
   
   Before:
   <img width="1393" alt="before" 
src="https://user-images.githubusercontent.com/1851560/92276029-8b02ce00-eef0-11ea-88b7-1d5a2efad503.png";>
   
   After:
   <img width="1399" alt="after" 
src="https://user-images.githubusercontent.com/1851560/92276050-8fc78200-eef0-11ea-92ea-a5e420103e79.png";>
   
   With the change, the [code spends far less 
time](http://angusyoung.org/arquivos/tmp/profile-modified.svg) in the 
CamelTask.poll() than the [current one we 
have](http://angusyoung.org/arquivos/tmp/profile-current.svg).
   
   Of course, this is just an initial **proof of concept**. Although it passes 
through all the tests, we need to do more serious testing, reviews, cleanups, 
etc ... but it looks there's something we can do here.
   


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to