-
1. Re: Performance optimization in OrderedExecutorFactory
gaohoward Dec 6, 2012 10:29 PM (in response to mreasy)Do you have any test to show the performance difference ?
Howard
-
2. Re: Performance optimization in OrderedExecutorFactory
clebert.suconic Dec 12, 2012 4:01 PM (in response to gaohoward)I see a possible race condition where the system would starve.
The synchronized here is protecting both running and tasks.. that means.. you wouldn't have running=false while still having tasks.
You could have a case where running=false and you still have tasks... and the system would starve until you executed something else. Which will be fine for most of the time, but it could cause issues when you have low throuput.
To fix that the class could retry on a synchronized...
I have your fix with this latest change here: https://github.com/clebertsuconic/hornetq/blob/d98f4b8a16d04af81207399ea141208a37e7a0a4/hornetq-core-client/src/main/java/org/hornetq/utils/OrderedExecutorFactory.java
and a new diff here: https://github.com/clebertsuconic/hornetq/commit/d98f4b8a16d04af81207399ea141208a37e7a0a4
-
3. Re: Performance optimization in OrderedExecutorFactory
clebert.suconic Dec 12, 2012 4:02 PM (in response to clebert.suconic)thanks for the change BTW: I will edit the commit later to reflect your name on the contribution.
-
4. Re: Performance optimization in OrderedExecutorFactory
mreasy Dec 26, 2012 5:12 AM (in response to clebert.suconic)Thanks Clebert for review and the additional changes.
Currently on vacation, will look into it again in January and provide feedback.
-
5. Re: Performance optimization in OrderedExecutorFactory
mreasy Jan 9, 2013 8:30 AM (in response to mreasy)Tested your version and works well - thanks