Sunday, April 15, 2012

Eclipse not responding

Having spent most of my current project watching an hourglass hovering on Eclipse,
I have at last decided to do something about that.

Eclipse executable is in: C:\Oracle\Middleware\oepe_11gR1PS4\eclipse.exe

C:/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin/javaw.exe

In the same directory, the eclipse.ini contains:

-vm
C:/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Xms256m
-Xmx768m
-XX:MaxPermSize=256m
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Dweblogic.home=C:\Oracle\Middleware\wlserver_10.3
-Dharvester.home=C:\Oracle\Middleware\Oracle_OSB1\harvester
-Dosb.home=C:\Oracle\Middleware\Oracle_OSB1
-Dosgi.bundlefile.limit=750
-Dosgi.nl=en_US

I run Task Manager, and View Columns PID, so that I know the PID of this JVM

I install VisualVM to connect to the Eclipse JVM (anyway the Eclipse process is properly named in VisualVM, no need to use Task Manager to view the PID)

I click on the Threads tab and I am ready to monitor the next "Not Responding" event...I also click on "Sampler", it hangs for a while to determine if Eclipse supports CPU and Memory profiling.... it does!

So I monitor the CPU while Eclipse seems to be hanging, and I notice that the jrockit.net.SocketNativeIO.readBytesPinned is eating my CPU alive...

Oh, but why JRockit? Because it's the vm option in eclipse.ini.

What if I switch to Sun JVM?
I try with C:/Oracle/Middleware/jdk160_24/bin/javaw.exe

It seems to be more responsive now...

Will keep an eye on it.... next time I will do a
netstat -ano
(see here)
to find out on Windows which sockets are open by a PID


I have tried using:
Window/Preferences/Java/Editor/Content Assist/ Uncheck Auto Activation

No comments: