spring-react-example icon indicating copy to clipboard operation
spring-react-example copied to clipboard

engineHolder.get().invokeFunction("renderServer", comments) too slow

Open heyao opened this issue 10 years ago • 6 comments

every execute this method elapsed about 1 minutes.

heyao avatar Aug 29 '15 05:08 heyao

Maybe linked to https://bugs.openjdk.java.net/browse/JDK-8134403 ...

sdeleuze avatar Sep 08 '15 13:09 sdeleuze

Didn't noticed such slow perf at the time coding this example. What Java Version do you use?

winterbe avatar Sep 08 '15 19:09 winterbe

1.8.0_40-b25

heyao avatar Sep 09 '15 12:09 heyao

Perf bug mentioned by @sdeleuze is fixed for 8u66. You could test with an older Java version like 8u31.

winterbe avatar Sep 09 '15 13:09 winterbe

@winterbe thanks

heyao avatar Sep 09 '15 13:09 heyao

I was interested to see what the performance was like. I also wanted to try out the CompiledScript. Here is a commit that tries a hundred runs as-is then a hundred runs as CompiledScript. Plotting output out of mvn test shows on my macbook pro an average runtime of 12.3ms for the original approach and 10.7 for the CompiledScript approach.

simbo1905 avatar Feb 14 '18 11:02 simbo1905