Marc Salm wrote:
> Now I'm working with
> -ms16m -mx500m -Xincgc
> 
> This seems to work fine. No Internal Errors so far and switching
> between projects seems to "consume" less memory.
> I just have to keep an eye on the actual heapsize and trigger
> GC if it gets to big.

I just worte a plugin, that invokes GC every 60 seconds automatically.
This seems to do the trick for me. Now I can switch between projects
without too much memory consumption. I still use -ms16m -mx500m -Xincgc.
Seems to be a perfect combination for me.

<CODE>
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;

import java.awt.*;

public class GCThread extends AnAction {
     public void actionPerformed(AnActionEvent event) {
         new Thread() {
             public void run() {
                 while (true) {
                     Runtime.getRuntime().gc();
                     try {
                         sleep(60000);
                     } catch (InterruptedException e) {
                     }
                 }
             }
         }.start();
     }
}
</CODE>

Attached you find the jar of the plugin, if you want to use it.
I think it's not worth to put on the wiki, isn't it?

Is there a way to invoke a plugin directly when IDEA is started?
At the moment I have to make one single click.

ciao

Marc Salm
http://www.codebasket.de
--
My software never has bugs. It just develops random features.

Attachment: GCThread.jar
Description: Binary data

Reply via email to