I recently ran into an issue due to the amount of Flex and Java projects in Eclipse. I usually have one or two projects open in Eclipse.

I was getting very poor performance after opening several files in the project space. Eventually I ran out of memory for Eclipse to operate in. I have 2 gigs of ram and plenty of CPU horsepower on my workstation, so that wasn’t the issue.

What I found was to allocate more memory to the Java heap memory. Eclipse allocates up to 256m by default.

Open the following file:

{eclipse-install-dir}eclipse/eclipse.ini

Update or add:

-vmargs -Xms40m -Xmx512m

You may need to also up the permanent generation memory space using this parameter(default is 64m):

-vmargs -XX:MaxPermSize=<memory size>

I haven’t had an Eclipse crash in a week now. I guess the other option would to not have so many projects in my workspace or have multiple workspaces.