Re: Optimizing groovy performace

2016-04-17 Thread Serega Sheypak
Ok, finally the solution is: count = 139724 mean rate = 8950.43 calls/second 1-minute rate = 2011.54 calls/second 5-minute rate = 426.96 calls/second 15-minute rate = 143.76 calls/second min = 0.02 milliseconds max = 24.18 mil

Re: Optimizing groovy performace

2016-04-17 Thread Jochen Theodorou
On 17.04.2016 14:36, Serega Sheypak wrote: ok, I see weird results. I've wrote a test https://gist.github.com/seregasheypak/d59997dd2d2dfbf82e310b16398239ca Here are metrics for method named "play" TriggerPlayer.play-trigger [...] Here are metrics for method named "executeHere" [...] "execu

Re: Optimizing groovy performace

2016-04-17 Thread Jochen Theodorou
On 17.04.2016 14:41, Serega Sheypak wrote: Ok try{ mySuperHeavyMethod() }catch(){} runs 10 times slower that without try/catch... why :) Well... ever tried something like this? boolean booleanThatIsNeverTrue = false public void aMethod() { if (booleanThatIsNeverTrue) { foo() } bar()

Re: Optimizing groovy performace

2016-04-17 Thread Serega Sheypak
Ok try{ mySuperHeavyMethod() }catch(){} runs 10 times slower that without try/catch... why :) 2016-04-17 14:36 GMT+02:00 Serega Sheypak : > ok, I see weird results. > I've wrote a test > https://gist.github.com/seregasheypak/d59997dd2d2dfbf82e310b16398239ca > > Here are metrics for method na

Re: Optimizing groovy performace

2016-04-17 Thread Serega Sheypak
ok, I see weird results. I've wrote a test https://gist.github.com/seregasheypak/d59997dd2d2dfbf82e310b16398239ca Here are metrics for method named "play" TriggerPlayer.play-trigger count = 83043 mean rate = 395.52 calls/second 1-minute rate = 555.30 calls/second

Re: Optimizing groovy performace

2016-04-16 Thread Serega Sheypak
> Firstly sorry for not answering so fast. I have not so much spare time these days :( And your question requires some thought No problem, I really happy to get any input from community members side. if I now assume this will start 1000 threads, each with its own cache, then you get 20k compilation

Re: Optimizing groovy performace

2016-04-16 Thread Jochen Theodorou
Firstly sorry for not answering so fast. I have not so much spare time these days :( And your question requires some thought On 11.04.2016 12:58, Serega Sheypak wrote: [...] *>do you reuse the scripts, or do you make a new script each time?* I suppose I do reuse, please have a look at "ScriptFa

Re: Optimizing groovy performace

2016-04-14 Thread Serega Sheypak
Bump 2016-04-12 11:19 GMT+02:00 Serega Sheypak : > Hi, any update here? Could you give me some input for further > investigation? > > 2016-04-11 12:58 GMT+02:00 Serega Sheypak : > >> *>you wrote there are 20 such replacement cases... executing 20 scripts >> is hardly a problem, so it must happen

Re: Optimizing groovy performace

2016-04-12 Thread Serega Sheypak
Hi, any update here? Could you give me some input for further investigation? 2016-04-11 12:58 GMT+02:00 Serega Sheypak : > *>you wrote there are 20 such replacement cases... executing 20 scripts is > hardly a problem, so it must happen in a loop...* > Sorry, didn't understand, what do you mean by

Re: Optimizing groovy performace

2016-04-11 Thread Serega Sheypak
*>you wrote there are 20 such replacement cases... executing 20 scripts is hardly a problem, so it must happen in a loop...* Sorry, didn't understand, what do you mean by loop? *>do you reuse the scripts, or do you make a new script each time? * I suppose I do reuse, please have a look at "ScriptF

Re: Optimizing groovy performace

2016-04-11 Thread Jochen Theodorou
On 10.04.2016 20:52, Serega Sheypak wrote: > org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.doCallSiteTargetSet I see this method after switching to indy version with invkoedynamic That is a hint, that you have a lot of invalid callsites going on What does it mean? What can I do in

Re: Optimizing groovy performace

2016-04-10 Thread Serega Sheypak
> org.codehaus.groovy.vmplugin.v7.Selector$MethodSelector.doC allSiteTargetSet I see this method after switching to indy version with invkoedynamic > That is a hint, that you have a lot of invalid callsites going on What does it mean? What can I do in order fix it? >Those are all strings? Script

Re: Optimizing groovy performace

2016-04-10 Thread Jochen Theodorou
On 10.04.2016 19:38, Serega Sheypak wrote: I'm working on groovy code performance optimization. I've used jvisualvm to connect to running application and gather CPU samples. Samples say that/org.codehaus.groovy.reflection.CachedMethod.inkove/ takes the most CPU time. I don't see any other applica

Re: Optimizing groovy performace

2016-04-10 Thread emmanuel r
Take a look at BTrace. You can create a script to get method execution times and run it against your app. Especially if you tell it to log all method calls; keeping in mind the performance penalty, of course. I wrote my script to write out in csv format, and then I opened the log in Libre Office fo

Optimizing groovy performace

2016-04-10 Thread Serega Sheypak
I'm working on groovy code performance optimization. I've used jvisualvm to connect to running application and gather CPU samples. Samples say that *org.codehaus.groovy.reflection.CachedMethod.inkove* takes the most CPU time. I don't see any other application methods in samples. What is the right