Page 1 of 2 12 LastLast
Results 1 to 20 of 23
Like Tree1Likes

Thread: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

  1. #1
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Hi all,

    As I've seen here and around the net, some of us are encountering a frustrating issue: Coding in Eclipse creates a smooth-running, workable application, but once exported to .jar, unexpected slowness or brokenness occurs. I've spent a few months coding an application and have run into this.

    Currently, I right-click > Export project, select .jar, Next, Select all my classes, etc, check 'Use existing Manifest', etc, standard export procedure. My manifest.mf is as follows:

    Manifest-Version: 1.0
    Main-Class: PCQ.gui2
    SplashScreen-Image: measlogo.png

    When I run the .jar, response time is incredibly slow, my jtable filter functionality doesn't work, and the app performs in a generally sluggish manner. Now, I've looked around the net and seen that often Eclipse IDE will be using a different, more recent JVM than that of the Windows environment.

    I'm trying to align the two in hopes my .jar will run as intended.

    I've looked here: C:\Program Files\Java\jre6\bin\client and cant look inside the jvm.dll some are talking about. I don't have permission to install an app like "Peek" to look at the contents.

    In windows command prompt I run: java -version | find "build" and get:

    java version "1.6.0_31"
    <build 1.6.0_3-b05>

    In Eclipse, Help>About Eclipse>Installation Details> Configuration Details I search for 'vm', it points back to the above .dll file.

    IN SUMMARY: I need help!

    1. Bottom line is I need a .jar to work with the same performance as is being achieved by Eclipse IDE.
    2. I need (detailed) help on configuring windows to use the correct JVM.
    3. If there are other variables that I'm not aware of, please, please provide any insight.

    Thank you!

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,932
    Rep Power
    8

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Can you show us an SSCCE that runs faster in eclipse than by itself?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Not to second guess you, but I feel that the salient context is a large-ish application, not a (Short)SCCE, as encountered by the Windows JVM vice Eclipse-selected JVM. This is to say, I believe it is a configuration discrpancy as encountered by the platform and/or virtual machine in the IDE vice Windows environment, not a code-specific problem.

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    A hunch is that this is not JVM settings which differ in Eclipse vs. Windows, but rather something more subtle (again, only a hunch - you should verify Eclipse and Windows use the same JVM versions). There may be intricacies about your application that might slow it down relative to Eclipse (an SSCCE may or may not show this, but the process of creating one might pinpoint the issue), a few I've heard of include lots of printing to the command line (native console and eclipse console may differ in how they handle IO) and running local processing using ProcessBuilder or Runtime.exec. EDIT: If you are making lots of command line prints, try changing the System.out stream to stream to a file and see if this does anything.

  5. #5
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Quote Originally Posted by doWhile View Post
    you should verify Eclipse and Windows use the same JVM versions.
    I'm not sure exactly how to go about this. In cmd line I know I can do java -version, and I get:

    java version "1.6.0_31"
    Java(TM) SE Runtime Environment (build 1.6.0_31-b05)
    Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing)

    How do I verify in Eclipse IDE?

  6. #6
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Quote Originally Posted by Redefine12 View Post
    How do I verify in Eclipse IDE?
    It should be the same, but just to verify:

    Java Code:
    	public static void main(String[] args) {
    	    System.out.println(System.getProperty("java.runtime.version"));
    	  }

  7. #7
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Thanks, doWhile.

    So, I've verified they are both: 1.6.0_31-b05

    I've commented out all println statements in all classes, and still the paniful difference in performance between the IDE and the .jar remains. Not sure where to go from here.

  8. #8
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    7

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Quote Originally Posted by Redefine12 View Post
    I've commented out all println statements in all classes, and still the paniful difference in performance between the IDE and the .jar remains. Not sure where to go from here.
    Unfortunately I'm not sure what could be the problem then (maybe someone else will chime in with thoughts as well). Just to push the idea that Kevin raised above, trying to compose an SSCCE might help you break the problem down and narrow the scope of where the issue lies, and it would definitely help us try and reproduce the problem on our machines. More info might help as well - when its slugish, what is it doing? If you profile a simple program that just cranks away doing some random task, does this take longer?

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Do you know if you have any runtime parameters set in Eclipse?
    I would also log the memory parameters (Runtime.maxMemory() etc), so you can tell on start up what sort of memory allocation your app gets on each environment.
    Finally I would look into how the garbage collector is reacting. It's quite possible there's different parameters at work there. You'll need to look into how to do that as I haven't got the docs handy at the moment.

    An app run up in Eclipse has the memory allocation that Eclipse has, which is likely to be more than that allocated by default to an app run up via double clicking a jar (I have 2Gb allocated to Eclipse at the moment, and the default for an exe jar is half that). Consequently if you have a memory hungry app it could be GCing a lot more.

    In fact, one test would be to fire it up manually from the command line, assigning an Xmx equivalent to that given to Eclipse.
    doWhile likes this.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  10. #10
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Quote Originally Posted by Redefine12 View Post
    I believe it is a configuration discrpancy as encountered by the platform and/or virtual machine in the IDE vice Windows environment, not a code-specific problem.
    Why?

    You can also check the runtime and JVM arguments you are using when you run the app from within eclipse and make these the same when you run the executable jar. But, really, I wouldn't rule out the possibility that the runtime behaviour of the code is some function of the code itself. Are there particular methods that are taking a lot of execution time? Are exceptions reported associated with the broken functionality?

  11. #11
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    If it's the same box, and the same JVM, then I would seriously consider it a setup problem (ie JVM arguments), as I presume (and the OP indicates this is the case) the same tasks are being done on both environments. Only if the work the app is doing is different on each environment would I consider it a problem with the code, but then I would question the testing in Eclipse.

    Put it this way, if the program does a lot of churning of objects then the "slow down" on a JVM with lots of memory will be less frequent than on one with less, since gc will be more common with less memory (depending on settings).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  12. #12
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Ok, this is my eclipse.ini file contents:

    -startup
    plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1 00.v20110502
    -product
    org.eclipse.epp.package.java.product
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms40m
    -Xmx512m


    I'm new at this, how would I run my .jar with the same parameters specified? Something like

    java -jar testjar.jar -??

    Or what about adding something in Windows to Control Panel> Java> (Java Tab)> View> Runtime Parameters?
    Last edited by Redefine12; 06-21-2012 at 09:50 PM.

  13. #13
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    If it's the same box, and the same JVM, then I would seriously consider it a setup problem (ie JVM arguments), as I presume (and the OP indicates this is the case) the same tasks are being done on both environments.
    I guess I just wasn't so sure that the same tasks really are being done. (What would be the effect of a "missing" resource? Might it trigger some really slow network activity?) It's not that I'm opposed to getting the JVM parameters the same, it's that if the code is slow and functionality is broken when the jar is executed I would look to the code to see what is going on (profile, exceptions).

    @OP - Take what I say with a grain of salt: I don't have the experience of many here.

    You can run the java executable with the -X arguments to set the memory parameters.

  14. #14
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Quote Originally Posted by Redefine12 View Post
    Ok, this is my eclipse.ini file contents:

    -startup
    plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1 00.v20110502
    -product
    org.eclipse.epp.package.java.product
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms40m
    -Xmx512m


    I'm new at this, how would I run my .jar with the same parameters specified? Something like

    java -jar testjar.jar -??

    Or what about adding something in Windows to Control Panel> Java> (Java Tab)> View> Runtime Parameters?
    That looks like the basic Eclipse setup which, depending on your machine, might well actually have less memory assigned to it than your default Java.
    So, are you doing the same processing when running in Eclipse as you are when running the jar file separately?
    Does the jar file contain everything needed to run your app?

    Then, as pbrockway says, you'll need to start digging into it with a profiler, monitor garbage collection, etc etc. Stuff we cannot do for you.
    You need to look into what it is you are doing differently between the two runtimes.
    This is the same box, same JVM, so something you are doing between running it in Eclipse and running it via the command line is different and causing this.

    Quote Originally Posted by pbrockway2 View Post
    I guess I just wasn't so sure that the same tasks really are being done. (What would be the effect of a "missing" resource? Might it trigger some really slow network activity?) It's not that I'm opposed to getting the JVM parameters the same, it's that if the code is slow and functionality is broken when the jar is executed I would look to the code to see what is going on (profile, exceptions).

    @OP - Take what I say with a grain of salt: I don't have the experience of many here.

    You can run the java executable with the -X arguments to set the memory parameters.
    Looking at those Eclipse parameters I suspect you could be more correct than me...:)
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  15. #15
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    "So, are you doing the same processing when running in Eclipse as you are when running the jar file separately?
    Does the jar file contain everything needed to run your app?

    Yes and yes.

    Does this trace from -Xprof illuminate anything to you more experienced (basically anyone but me) Java gurus? Especially at the very bottom, 13.9% time spent on Garbage Collection? (I know it's long, sorry):

    java -jar -Xprof testjar.jar -
    vmargs -Xms2048M -Xmx2048M

    Flat profile of 1.01 secs (45 total ticks): AWT-Shutdown

    Thread-local ticks:
    100.0% 45 Blocked (of total)


    Flat profile of 37.56 secs (1368 total ticks): main

    Interpreted + native Method
    4.7% 64 + 0 java.lang.String.length
    0.8% 11 + 0 java.util.ArrayList.size
    0.7% 10 + 0 java.util.AbstractList$ListItr.nextIndex
    0.4% 0 + 5 sun.nio.ch.FileDispatcher.read0
    0.2% 3 + 0 java.io.LineNumberReader.skip
    0.1% 0 + 2 java.io.WinNTFileSystem.canonicalize0
    0.1% 0 + 2 java.lang.ClassLoader$NativeLibrary.load
    0.1% 1 + 0 java.awt.Toolkit.setDesktopProperty
    0.1% 1 + 0 java.nio.Buffer.capacity
    0.1% 1 + 0 java.util.regex.Matcher.group
    0.1% 0 + 1 java.io.WinNTFileSystem.canonicalizeWithPrefix0
    0.1% 0 + 1 java.io.FileInputStream.readBytes
    0.1% 0 + 1 java.io.WinNTFileSystem.checkAccess
    0.1% 0 + 1 java.lang.Thread.currentThread
    0.1% 1 + 0 java.util.AbstractCollection.toArray
    0.1% 1 + 0 java.lang.Boolean.<init>
    0.1% 1 + 0 java.awt.Component.isLightweight
    0.1% 0 + 1 java.io.FileInputStream.open
    0.1% 1 + 0 java.lang.StrictMath.floorOrCeil
    0.1% 1 + 0 java.util.LinkedList$ListItr.<init>
    0.1% 1 + 0 java.util.regex.Pattern$Dollar.match
    0.1% 0 + 1 java.security.AccessController.getStackAccessContr olCon
    text
    0.1% 1 + 0 java.util.regex.Pattern.RemoveQEQuoting
    0.1% 0 + 1 sun.java2d.d3d.D3DGraphicsDevice.initD3D
    0.1% 1 + 0 sun.font.FontDesignMetrics.getMetrics
    8.6% 101 + 16 Total interpreted (including elided)

    Compiled + native Method
    11.3% 155 + 0 java.lang.String.<init>
    8.5% 116 + 0 java.nio.CharBuffer.charAt
    7.8% 106 + 0 java.util.regex.Pattern$CharProperty.match
    7.1% 97 + 0 java.util.regex.Pattern$Slice.match
    6.4% 87 + 0 java.util.regex.Matcher.search
    5.0% 68 + 0 java.lang.AbstractStringBuilder.append
    4.3% 59 + 0 java.util.regex.Pattern$BmpCharProperty.match
    4.1% 56 + 0 java.lang.String.subSequence
    3.4% 46 + 1 java.util.regex.Matcher.appendReplacement
    3.2% 44 + 0 sun.nio.cs.SingleByteDecoder.decodeArrayLoop
    3.1% 43 + 0 java.util.regex.Pattern$Start.match
    2.5% 34 + 0 java.util.regex.Pattern$Curly.match0
    1.8% 24 + 0 java.util.regex.Pattern$6.isSatisfiedBy
    1.8% 24 + 0 java.lang.Character.codePointAt
    1.6% 22 + 0 java.util.regex.Matcher.replaceAll
    1.5% 21 + 0 java.io.LineNumberReader.read
    1.3% 6 + 12 java.util.regex.Pattern.split
    1.2% 0 + 17 java.lang.String.substring
    1.0% 13 + 0 java.lang.StringBuffer.append
    0.7% 5 + 4 pcInvpkg.SearchTest$MyModel.<init>
    0.6% 1 + 7 java.util.regex.Pattern.compile
    0.4% 6 + 0 java.util.AbstractCollection.toArray
    0.4% 6 + 0 java.util.regex.Matcher.reset
    0.4% 2 + 3 java.util.regex.Pattern.matcher
    0.4% 5 + 0 java.nio.Buffer.<init>
    82.4% 1073 + 54 Total compiled (including elided)

    Stub + native Method
    7.3% 0 + 100 java.lang.Object.clone
    0.6% 0 + 8 sun.nio.ch.FileDispatcher.read0
    0.5% 0 + 7 java.io.FileInputStream.readBytes
    0.3% 0 + 4 java.lang.Thread.isInterrupted
    0.1% 0 + 2 sun.misc.Unsafe.copyMemory
    0.1% 0 + 1 java.lang.System.identityHashCode
    8.9% 0 + 122 Total stub

    Thread-local ticks:
    0.1% 1 Blocked (of total)
    0.1% 1 Unknown: no last frame


    Flat profile of 59.66 secs (2646 total ticks): AWT-Windows

    Interpreted + native Method
    100.0% 2 + 2642 sun.awt.windows.WToolkit.eventLoop
    0.0% 0 + 1 sun.awt.windows.WToolkit.init
    100.0% 2 + 2643 Total interpreted

    Thread-local ticks:
    0.0% 1 Blocked (of total)


    Flat profile of 0.10 secs (6 total ticks): Thread-1

    Interpreted + native Method
    100.0% 0 + 6 sun.awt.windows.WToolkit.shutdown
    100.0% 0 + 6 Total interpreted


    Flat profile of 21.62 secs (1282 total ticks): TimerQueue

    Thread-local ticks:
    100.0% 1282 Blocked (of total)


    Flat profile of 22.06 secs (1287 total ticks): DestroyJavaVM

    Thread-local ticks:
    100.0% 1287 Blocked (of total)


    Flat profile of 22.54 secs (1299 total ticks): AWT-EventQueue-0

    Interpreted + native Method
    10.0% 0 + 2 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnd
    erCursor
    5.0% 1 + 0 java.lang.ref.Reference.get
    5.0% 1 + 0 sun.awt.windows.WGlobalCursorManager.findComponent At
    5.0% 0 + 1 sun.awt.windows.WGlobalCursorManager.setCursor
    5.0% 1 + 0 javax.swing.table.DefaultTableCellRenderer.setBack groun
    d
    5.0% 1 + 0 sun.java2d.SurfaceData.pixelFor
    5.0% 0 + 1 sun.java2d.windows.GDIBlitLoops.nativeBlit
    5.0% 1 + 0 sun.java2d.pipe.ValidatePipe.fillRect
    5.0% 1 + 0 javax.swing.plaf.basic.BasicBorders.getRadioButton Borde
    r
    5.0% 1 + 0 java.awt.geom.AffineTransform.<init>
    5.0% 1 + 0 javax.swing.TimerQueue.addTimer
    5.0% 1 + 0 pcInvpkg.gui2$1.paintComponent
    5.0% 1 + 0 sun.swing.DefaultLookup.get
    5.0% 1 + 0 sun.java2d.pipe.GlyphListPipe.drawString
    5.0% 1 + 0 javax.swing.plaf.metal.MetalRadioButtonUI.paint
    80.0% 12 + 4 Total interpreted

    Compiled + native Method
    5.0% 0 + 1 java.awt.Rectangle.getBounds
    5.0% 0 + 1 java.lang.String.substring
    5.0% 0 + 1 java.util.regex.Pattern.compile
    15.0% 0 + 3 Total compiled

    Stub + native Method
    5.0% 0 + 1 sun.java2d.loops.Blit.Blit
    5.0% 0 + 1 Total stub

    Thread-local ticks:
    98.5% 1279 Blocked (of total)


    Flat profile of 22.55 secs (1300 total ticks): AWT-Shutdown

    Thread-local ticks:
    100.0% 1300 Blocked (of total)


    Flat profile of 59.76 secs (2654 total ticks): Java2D Disposer

    Thread-local ticks:
    100.0% 2654 Blocked (of total)


    Global summary of 59.82 seconds:
    100.0% 3107 Received ticks
    13.9% 432 Received GC ticks
    0.2% 6 Compilation
    0.5% 14 Other VM operations
    0.0% 1 Unknown code

  16. #16
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    How does that compare with Eclipse?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  17. #17
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Not sure how to get an xprof trace in eclipse. I've hacked at this all weekend am still stuck :(

  18. #18
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Pull up the runtime configurations and add the -Xprof to the VM arguments section for the thing you are executing.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  19. #19
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Thank you Tolls, I should have known that.

    Ok, so I'm seeing a pretty distinct difference between the -Xprof output when run in Eclipse vice from Windows cmd. Most notably, with Garbage Collection.

    -Xprof in Eclipse:

    Flat profile of 1.03 secs (53 total ticks): AWT-Shutdown

    Thread-local ticks:
    100.0% 53 Blocked (of total)


    Flat profile of 26.07 secs (1242 total ticks): main

    Interpreted + native Method
    5.0% 62 + 0 java.lang.String.length
    0.5% 6 + 0 java.util.ArrayList.size
    0.4% 5 + 0 java.util.AbstractList$ListItr.nextIndex
    0.2% 0 + 3 sun.nio.ch.FileDispatcher.read0
    0.2% 0 + 3 java.io.FileInputStream.readBytes
    0.2% 3 + 0 pcInvpkg.readMeclData.returnMecl
    0.2% 0 + 2 java.lang.ClassLoader$NativeLibrary.load
    0.1% 1 + 0 java.awt.color.ICC_Profile.<init>
    0.1% 1 + 0 javax.swing.plaf.basic.BasicComboBoxRenderer.getLi stCellRendererComponent
    0.1% 1 + 0 sun.java2d.loops.GraphicsPrimitiveMgr$1.compare
    0.1% 1 + 0 javax.swing.text.AbstractDocument$BidiElement.<ini t>
    0.1% 1 + 0 java.io.LineNumberReader.skip
    0.1% 1 + 0 java.nio.Buffer.checkIndex
    0.1% 1 + 0 javax.swing.CellRendererPane.addImpl
    0.1% 1 + 0 sun.awt.SunToolkit.getSystemEventQueueImplPP
    0.1% 0 + 1 java.io.WinNTFileSystem.canonicalizeWithPrefix0
    0.1% 1 + 0 javax.swing.ArrayTable.put
    0.1% 1 + 0 javax.swing.UIDefaults.getFromHashtable
    0.1% 0 + 1 java.io.WinNTFileSystem.checkAccess
    0.1% 0 + 1 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnderCursor
    0.1% 0 + 1 java.lang.ClassLoader.findBootstrapClass
    0.1% 0 + 1 java.io.WinNTFileSystem.getBooleanAttributes
    0.1% 0 + 1 sun.awt.windows.WDesktopProperties.getWindowsParam eters
    0.1% 1 + 0 java.util.regex.Pattern.closure
    8.1% 87 + 14 Total interpreted

    Compiled + native Method
    12.0% 149 + 0 java.lang.String.<init>
    7.3% 90 + 0 java.nio.CharBuffer.charAt
    7.2% 89 + 0 java.util.regex.Matcher.search
    7.1% 88 + 0 java.util.regex.Pattern$CharProperty.match
    6.0% 74 + 0 java.util.regex.Pattern$Slice.match
    5.7% 71 + 0 java.util.regex.Pattern$BmpCharProperty.match
    4.6% 57 + 0 java.lang.AbstractStringBuilder.append
    3.8% 47 + 0 sun.nio.cs.SingleByteDecoder.decodeArrayLoop
    3.7% 46 + 0 java.lang.String.subSequence
    3.7% 46 + 0 java.util.regex.Pattern$Start.match
    3.4% 41 + 1 java.util.regex.Matcher.appendReplacement
    2.6% 32 + 0 java.util.regex.Pattern$Curly.match0
    2.0% 25 + 0 java.util.regex.Pattern$6.isSatisfiedBy
    1.9% 24 + 0 java.lang.Character.codePointAt
    1.9% 23 + 0 java.util.regex.Matcher.replaceAll
    1.5% 19 + 0 java.io.LineNumberReader.read
    1.2% 15 + 0 java.lang.StringBuffer.append
    0.9% 11 + 0 java.nio.Buffer.<init>
    0.6% 7 + 0 java.util.regex.Matcher.reset
    0.5% 6 + 0 java.util.regex.Pattern.split
    0.4% 5 + 0 java.util.regex.Matcher.find
    0.3% 4 + 0 java.util.regex.Matcher.usePattern
    0.3% 4 + 0 java.util.regex.Pattern$Branch.match
    0.3% 4 + 0 java.util.ArrayList.get
    0.3% 3 + 1 pcInvpkg.SearchTest$MyModel.<init>
    81.2% 1004 + 4 Total compiled (including elided)

    Stub + native Method
    8.4% 0 + 104 java.lang.Object.clone
    0.8% 0 + 10 sun.nio.ch.FileDispatcher.read0
    0.6% 0 + 8 java.io.FileInputStream.readBytes
    0.4% 0 + 5 java.lang.Thread.isInterrupted
    0.2% 0 + 3 sun.misc.Unsafe.copyMemory
    0.2% 0 + 2 java.lang.Thread.currentThread
    10.6% 0 + 132 Total stub

    Thread-local ticks:
    0.1% 1 Blocked (of total)


    Flat profile of 6.67 secs (426 total ticks): Image Fetcher 0

    Interpreted + native Method
    100.0% 1 + 0 java.awt.MediaTracker.setDone
    100.0% 1 + 0 Total interpreted

    Thread-local ticks:
    99.8% 425 Blocked (of total)


    Flat profile of 54.97 secs (3089 total ticks): AWT-Windows

    Interpreted + native Method
    99.9% 5 + 3080 sun.awt.windows.WToolkit.eventLoop
    0.0% 1 + 0 java.awt.event.InvocationEvent.<init>
    99.9% 6 + 3080 Total interpreted

    Compiled + native Method
    0.0% 0 + 1 sun.awt.AWTAutoShutdown.setToolkitBusy
    0.0% 0 + 1 Total compiled

    Stub + native Method
    0.0% 0 + 1 java.security.AccessController.getStackAccessContr olContext
    0.0% 0 + 1 Total stub

    Thread-local ticks:
    0.0% 1 Unknown: no last frame


    Flat profile of 0.10 secs (6 total ticks): Thread-1

    Interpreted + native Method
    100.0% 0 + 6 sun.awt.windows.WToolkit.shutdown
    100.0% 0 + 6 Total interpreted


    Flat profile of 28.99 secs (1854 total ticks): TimerQueue

    Interpreted + native Method
    75.0% 3 + 0 javax.swing.TimerQueue.postExpiredTimers
    25.0% 0 + 1 java.lang.Object.wait
    100.0% 3 + 1 Total interpreted

    Thread-local ticks:
    99.8% 1850 Blocked (of total)


    Flat profile of 29.06 secs (1858 total ticks): DestroyJavaVM

    Thread-local ticks:
    100.0% 1858 Blocked (of total)


    Flat profile of 29.30 secs (1868 total ticks): AWT-EventQueue-0

    Interpreted + native Method
    10.0% 0 + 4 sun.awt.windows.WGlobalCursorManager.setCursor
    7.5% 0 + 3 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnderCursor
    2.5% 0 + 1 java.io.WinNTFileSystem.canonicalize0
    2.5% 1 + 0 sun.awt.NullComponentPeer.setForeground
    2.5% 1 + 0 java.awt.AWTEvent.getID
    2.5% 0 + 1 sun.java2d.loops.FillRect.FillRect
    2.5% 0 + 1 sun.java2d.loops.Blit.Blit
    2.5% 0 + 1 java.security.AccessController.doPrivileged
    2.5% 1 + 0 java.util.LinkedList.add
    2.5% 0 + 1 sun.java2d.loops.MaskFill.DrawAAPgram
    2.5% 1 + 0 java.util.IdentityHashMap.keySet
    2.5% 1 + 0 sun.font.GlyphList.mapChars
    2.5% 1 + 0 sun.font.GlyphList.dispose
    2.5% 1 + 0 sun.font.GlyphList.getInstance
    2.5% 1 + 0 javax.swing.plaf.basic.BasicTabbedPaneUI.paint
    2.5% 1 + 0 java.awt.MultipleGradientPaintContext.<clinit>
    2.5% 1 + 0 pcInvpkg.SearchTest$RadioListener.actionPerformed
    2.5% 1 + 0 java.awt.Rectangle.intersection
    57.5% 11 + 12 Total interpreted

    Compiled + native Method
    10.0% 4 + 0 java.awt.RadialGradientPaintContext.simpleNonCycli cFillRaster
    2.5% 1 + 0 javax.swing.plaf.ComponentUI.update
    2.5% 1 + 0 java.beans.PropertyChangeSupport.firePropertyChang e
    2.5% 1 + 0 java.util.regex.Pattern$Start.match
    2.5% 1 + 0 java.awt.GradientPaintContext.clipFillRaster
    2.5% 1 + 0 javax.swing.CellRendererPane.paintComponent
    2.5% 1 + 0 pcInvpkg.SearchTest.returnReportData
    25.0% 10 + 0 Total compiled

    Stub + native Method
    5.0% 0 + 2 sun.java2d.loops.Blit.Blit
    2.5% 0 + 1 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnderCursor
    2.5% 0 + 1 sun.awt.windows.WGlobalCursorManager.setCursor
    2.5% 0 + 1 sun.java2d.loops.MaskFill.MaskFill
    2.5% 0 + 1 java.lang.Thread.holdsLock
    15.0% 0 + 6 Total stub

    Thread-local ticks:
    97.9% 1828 Blocked (of total)
    2.5% 1 Unknown: no last frame


    Flat profile of 29.30 secs (1868 total ticks): AWT-Shutdown

    Thread-local ticks:
    100.0% 1868 Blocked (of total)


    Flat profile of 55.08 secs (3097 total ticks): Java2D Disposer

    Thread-local ticks:
    100.0% 3097 Blocked (of total)


    Global summary of 55.13 seconds:
    100.0% 3179 Received ticks
    2.5% 79 Received GC ticks
    0.2% 7 Compilation
    0.1% 2 Unknown code





    ************************************************** ************************************************** **********
    -Xprof running from Windows CMD:

    Flat profile of 1.03 secs (53 total ticks): AWT-Shutdown

    Thread-local ticks:
    100.0% 53 Blocked (of total)


    Flat profile of 26.07 secs (1242 total ticks): main

    Interpreted + native Method
    5.0% 62 + 0 java.lang.String.length
    0.5% 6 + 0 java.util.ArrayList.size
    0.4% 5 + 0 java.util.AbstractList$ListItr.nextIndex
    0.2% 0 + 3 sun.nio.ch.FileDispatcher.read0
    0.2% 0 + 3 java.io.FileInputStream.readBytes
    0.2% 3 + 0 pcInvpkg.readMeclData.returnMecl
    0.2% 0 + 2 java.lang.ClassLoader$NativeLibrary.load
    0.1% 1 + 0 java.awt.color.ICC_Profile.<init>
    0.1% 1 + 0 javax.swing.plaf.basic.BasicComboBoxRenderer.getLi stCellRendererComponent
    0.1% 1 + 0 sun.java2d.loops.GraphicsPrimitiveMgr$1.compare
    0.1% 1 + 0 javax.swing.text.AbstractDocument$BidiElement.<ini t>
    0.1% 1 + 0 java.io.LineNumberReader.skip
    0.1% 1 + 0 java.nio.Buffer.checkIndex
    0.1% 1 + 0 javax.swing.CellRendererPane.addImpl
    0.1% 1 + 0 sun.awt.SunToolkit.getSystemEventQueueImplPP
    0.1% 0 + 1 java.io.WinNTFileSystem.canonicalizeWithPrefix0
    0.1% 1 + 0 javax.swing.ArrayTable.put
    0.1% 1 + 0 javax.swing.UIDefaults.getFromHashtable
    0.1% 0 + 1 java.io.WinNTFileSystem.checkAccess
    0.1% 0 + 1 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnderCursor
    0.1% 0 + 1 java.lang.ClassLoader.findBootstrapClass
    0.1% 0 + 1 java.io.WinNTFileSystem.getBooleanAttributes
    0.1% 0 + 1 sun.awt.windows.WDesktopProperties.getWindowsParam eters
    0.1% 1 + 0 java.util.regex.Pattern.closure
    8.1% 87 + 14 Total interpreted

    Compiled + native Method
    12.0% 149 + 0 java.lang.String.<init>
    7.3% 90 + 0 java.nio.CharBuffer.charAt
    7.2% 89 + 0 java.util.regex.Matcher.search
    7.1% 88 + 0 java.util.regex.Pattern$CharProperty.match
    6.0% 74 + 0 java.util.regex.Pattern$Slice.match
    5.7% 71 + 0 java.util.regex.Pattern$BmpCharProperty.match
    4.6% 57 + 0 java.lang.AbstractStringBuilder.append
    3.8% 47 + 0 sun.nio.cs.SingleByteDecoder.decodeArrayLoop
    3.7% 46 + 0 java.lang.String.subSequence
    3.7% 46 + 0 java.util.regex.Pattern$Start.match
    3.4% 41 + 1 java.util.regex.Matcher.appendReplacement
    2.6% 32 + 0 java.util.regex.Pattern$Curly.match0
    2.0% 25 + 0 java.util.regex.Pattern$6.isSatisfiedBy
    1.9% 24 + 0 java.lang.Character.codePointAt
    1.9% 23 + 0 java.util.regex.Matcher.replaceAll
    1.5% 19 + 0 java.io.LineNumberReader.read
    1.2% 15 + 0 java.lang.StringBuffer.append
    0.9% 11 + 0 java.nio.Buffer.<init>
    0.6% 7 + 0 java.util.regex.Matcher.reset
    0.5% 6 + 0 java.util.regex.Pattern.split
    0.4% 5 + 0 java.util.regex.Matcher.find
    0.3% 4 + 0 java.util.regex.Matcher.usePattern
    0.3% 4 + 0 java.util.regex.Pattern$Branch.match
    0.3% 4 + 0 java.util.ArrayList.get
    0.3% 3 + 1 pcInvpkg.SearchTest$MyModel.<init>
    81.2% 1004 + 4 Total compiled (including elided)

    Stub + native Method
    8.4% 0 + 104 java.lang.Object.clone
    0.8% 0 + 10 sun.nio.ch.FileDispatcher.read0
    0.6% 0 + 8 java.io.FileInputStream.readBytes
    0.4% 0 + 5 java.lang.Thread.isInterrupted
    0.2% 0 + 3 sun.misc.Unsafe.copyMemory
    0.2% 0 + 2 java.lang.Thread.currentThread
    10.6% 0 + 132 Total stub

    Thread-local ticks:
    0.1% 1 Blocked (of total)


    Flat profile of 6.67 secs (426 total ticks): Image Fetcher 0

    Interpreted + native Method
    100.0% 1 + 0 java.awt.MediaTracker.setDone
    100.0% 1 + 0 Total interpreted

    Thread-local ticks:
    99.8% 425 Blocked (of total)


    Flat profile of 54.97 secs (3089 total ticks): AWT-Windows

    Interpreted + native Method
    99.9% 5 + 3080 sun.awt.windows.WToolkit.eventLoop
    0.0% 1 + 0 java.awt.event.InvocationEvent.<init>
    99.9% 6 + 3080 Total interpreted

    Compiled + native Method
    0.0% 0 + 1 sun.awt.AWTAutoShutdown.setToolkitBusy
    0.0% 0 + 1 Total compiled

    Stub + native Method
    0.0% 0 + 1 java.security.AccessController.getStackAccessContr olContext
    0.0% 0 + 1 Total stub

    Thread-local ticks:
    0.0% 1 Unknown: no last frame


    Flat profile of 0.10 secs (6 total ticks): Thread-1

    Interpreted + native Method
    100.0% 0 + 6 sun.awt.windows.WToolkit.shutdown
    100.0% 0 + 6 Total interpreted


    Flat profile of 28.99 secs (1854 total ticks): TimerQueue

    Interpreted + native Method
    75.0% 3 + 0 javax.swing.TimerQueue.postExpiredTimers
    25.0% 0 + 1 java.lang.Object.wait
    100.0% 3 + 1 Total interpreted

    Thread-local ticks:
    99.8% 1850 Blocked (of total)


    Flat profile of 29.06 secs (1858 total ticks): DestroyJavaVM

    Thread-local ticks:
    100.0% 1858 Blocked (of total)


    Flat profile of 29.30 secs (1868 total ticks): AWT-EventQueue-0

    Interpreted + native Method
    10.0% 0 + 4 sun.awt.windows.WGlobalCursorManager.setCursor
    7.5% 0 + 3 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnderCursor
    2.5% 0 + 1 java.io.WinNTFileSystem.canonicalize0
    2.5% 1 + 0 sun.awt.NullComponentPeer.setForeground
    2.5% 1 + 0 java.awt.AWTEvent.getID
    2.5% 0 + 1 sun.java2d.loops.FillRect.FillRect
    2.5% 0 + 1 sun.java2d.loops.Blit.Blit
    2.5% 0 + 1 java.security.AccessController.doPrivileged
    2.5% 1 + 0 java.util.LinkedList.add
    2.5% 0 + 1 sun.java2d.loops.MaskFill.DrawAAPgram
    2.5% 1 + 0 java.util.IdentityHashMap.keySet
    2.5% 1 + 0 sun.font.GlyphList.mapChars
    2.5% 1 + 0 sun.font.GlyphList.dispose
    2.5% 1 + 0 sun.font.GlyphList.getInstance
    2.5% 1 + 0 javax.swing.plaf.basic.BasicTabbedPaneUI.paint
    2.5% 1 + 0 java.awt.MultipleGradientPaintContext.<clinit>
    2.5% 1 + 0 pcInvpkg.SearchTest$RadioListener.actionPerformed
    2.5% 1 + 0 java.awt.Rectangle.intersection
    57.5% 11 + 12 Total interpreted

    Compiled + native Method
    10.0% 4 + 0 java.awt.RadialGradientPaintContext.simpleNonCycli cFillRaster
    2.5% 1 + 0 javax.swing.plaf.ComponentUI.update
    2.5% 1 + 0 java.beans.PropertyChangeSupport.firePropertyChang e
    2.5% 1 + 0 java.util.regex.Pattern$Start.match
    2.5% 1 + 0 java.awt.GradientPaintContext.clipFillRaster
    2.5% 1 + 0 javax.swing.CellRendererPane.paintComponent
    2.5% 1 + 0 pcInvpkg.SearchTest.returnReportData
    25.0% 10 + 0 Total compiled

    Stub + native Method
    5.0% 0 + 2 sun.java2d.loops.Blit.Blit
    2.5% 0 + 1 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnderCursor
    2.5% 0 + 1 sun.awt.windows.WGlobalCursorManager.setCursor
    2.5% 0 + 1 sun.java2d.loops.MaskFill.MaskFill
    2.5% 0 + 1 java.lang.Thread.holdsLock
    15.0% 0 + 6 Total stub

    Thread-local ticks:
    97.9% 1828 Blocked (of total)
    2.5% 1 Unknown: no last frame


    Flat profile of 29.30 secs (1868 total ticks): AWT-Shutdown

    Thread-local ticks:
    100.0% 1868 Blocked (of total)


    Flat profile of 55.08 secs (3097 total ticks): Java2D Disposer

    Thread-local ticks:
    100.0% 3097 Blocked (of total)


    Global summary of 55.13 seconds:
    100.0% 3179 Received ticks
    2.5% 79 Received GC ticks
    0.2% 7 Compilation
    0.1% 2 Unknown code


    I don't understand how running the same code directly from the IDE vice from the .jar is causing such differences in performance. On a side-note, I've installed Eclipse MAT plugin, but am stuck on configuring the Heap Dump provider.

  20. #20
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default Re: JVM in Eclipse IDE vs JVM in Windows- poor .jar performance

    Aren't those the exact same profiles?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Page 1 of 2 12 LastLast

Similar Threads

  1. GUI frustrations - using Eclipse and now Windows Builder
    By White Mountains in forum New To Java
    Replies: 9
    Last Post: 07-08-2011, 09:56 AM
  2. Replies: 1
    Last Post: 05-18-2010, 09:42 AM
  3. Eclipse performance issues
    By stijnvp in forum Eclipse
    Replies: 2
    Last Post: 12-14-2009, 08:53 AM
  4. Eclipse debug not working on Windows Vista
    By mathew.vinay in forum Eclipse
    Replies: 5
    Last Post: 04-04-2009, 01:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •