We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › does my apps run faster with eclipse
Page Index Toggle Pages: 1
does my apps run faster with eclipse? (Read 1194 times)
does my apps run faster with eclipse?
Jul 12th, 2009, 7:37am
 
hello, one question , if there any benefit in terms of speed if i use eclipse , java and processing as a java library . Do the apps compiled in eclipse runs faster ?


thanks


pun.
Re: does my apps run faster with eclipse?
Reply #1 - Jul 12th, 2009, 2:33pm
 
No, they will run at the same speed, because they run on the same JVM.
Eclipse adds more comfort when writing programs, like autocompletion and navigation, allows to debug, and allows to use full Java 1.5 syntax, at the cost of the loosing the (slightly) simplified syntax of Processing.
Re: does my apps run faster with eclipse?
Reply #2 - Jul 13th, 2009, 8:39am
 
I expect it may be possible to improve the speed by using a faster JVM.  Has anyone tried JRocket?
Re: does my apps run faster with eclipse?
Reply #3 - Jul 13th, 2009, 10:03am
 
Perhaps you mean JRockit (that's what is proposed when I search JRocket JVM in Google...). Never heard of it before...
Re: does my apps run faster with eclipse?
Reply #4 - Jul 13th, 2009, 10:15am
 
Yes, JRockit JVM by Oracle.  It's suppose to be faster than Sun's implementation.
Re: does my apps run faster with eclipse?
Reply #5 - Jul 13th, 2009, 11:23am
 
usually, increasing the amount of memory available to the JVM does have an impact on speed. You can see how to do it in processing/lib/preferences.txt

Make sure to read the IMPORTANT notice at the beginning of the file.
Re: does my apps run faster with eclipse?
Reply #6 - Jul 13th, 2009, 12:06pm
 
A useful hint: sometime, the slow sketch is because of some un-optimized function, eg. creating too much short lived objects, or even loading strings, shapes, fonts or images in draw() (I saw it too often...).
If you go to the Java JDK bin directory, you will find a jvisualvm (.exe on Windows) file. Run it, attach it to your running sketch, and you will be able to visualize memory and CPU usage, among other things. You can profile the sketch and find out which function is the bootleneck of your application (if you broke them down to smaller parts, of course).
Re: does my apps run faster with eclipse?
Reply #7 - Jul 14th, 2009, 11:14pm
 
One other trick you can try is the '-server' command line switch.
It tells Java to try optimizing by recompiling.

I have seen improvement over time in a couple of my projects.

In addition to PhiLho's hint, you may not see any gain depending on your computer configuration (some systems use server mode by default).
Page Index Toggle Pages: 1