Performance Tip: Make More Memory Available!

I've seen a couple of customer projects today (thanks for sending those in!), and one thing became obvious: we've set the default maximum heap size for the Java VM too small. It's currently set to 128 Mb; but with the IDE running, lots of data sources, a dozen pages with lots of components on them etc. two of the projects were up in the 120 Mb range when all the pages are open at the same time.

So you should increase the amount of memory you make available to the IDE. This will not only make the IDE run faster (because when the IDE is getting near the memory limit it does a lot more garbage collection), but it will avoid OutOfMemory exceptions and other problems that occur if you actually get up to the limit.

To change the memory limit, do this: locate your IDE installation, and edit bin/ide.cfg with a text editor. It currently looks like this:

-J-Xms24m -J-Xmx128m
-J-Xverify:none
...
Change this into
-J-Xms24m -J-Xmx256m
-J-Xverify:none
...
and restart the IDE.

It's possible some of the Patch 5 symptoms showed up for some of you whose project memory requirements were near the limit, simply because with the extra preview features and other fixes, the IDE is taking up more of the available heap space and you run out of memory.

Comments:

Actually it might be better to change the line to:

<CODE> -J-Xms128m -J-Xmx256m
-J-Xverify:none </CODE>

If you know that you'll need that much memory, why start at 24m? Just start off at 128m and save yourself boot time resizing the heap

Posted by Azeem Jiva on December 24, 2004 at 01:33 AM PST #

The most annoying thing on Windows is that it swap you application onto disk as soon as it is in the background, even if you still have more than enough memory free. As Java apps are rather large, restoring them from swap takes a while and your application stucks for few seconds. To avoid it, you can tell Windows to only swap when really needed. See this tweak. After applying it, your application (and your entire desktop) will be much more respnsive.

Posted by Jean-Marc Autexier on December 26, 2004 at 12:03 AM PST #

Is there a way to increase memory for Studio Creator?

Posted by Rob Sinner on November 18, 2005 at 09:40 AM PST #

You mean other than what is described in the above blog entry? Can you be more specific?

Posted by Tor Norbye on November 18, 2005 at 10:07 AM PST #

I go to the following directory: C:\\Program Files\\Sun\\Creator2ea2\\bin and there is no file named ide.cfg Im assuming that you were referring to creator q2 2004 and that the location/name of this config file has changed but I dont know which one it is

Posted by Rob Sinner on November 21, 2005 at 02:26 AM PST #

Ah yes, its location has changed. It's now etc/creator.conf .

Posted by Tor Norbye on November 21, 2005 at 02:30 AM PST #

Post a Comment:
Comments are closed for this entry.
About

Tor Norbye

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today