Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23
Like Tree1Likes

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

  1. #21
    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

    Gah! Fail! Sorry to waste your time, copy/pasted wrong...
    Here are the correct profiles:


    From the CMD prompt (Windows XP):


    >java -jar -Xprof testjar.jar

    Flat profile of 1.00 secs (51 total ticks): AWT-Shutdown

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


    Flat profile of 29.13 secs (1247 total ticks): main

    Interpreted + native Method
    6.7% 84 + 0 java.lang.String.length
    3.3% 41 + 0 java.util.ArrayList.size
    0.4% 5 + 0 java.util.AbstractList$ListItr.nextIndex
    0.3% 4 + 0 java.io.LineNumberReader.skip
    0.2% 0 + 2 java.io.FileInputStream.readBytes
    0.1% 1 + 0 java.util.regex.Pattern$CharProperty.match
    0.1% 1 + 0 sun.nio.cs.StreamDecoder.inReady
    0.1% 1 + 0 java.lang.Class.searchFields
    0.1% 1 + 0 java.nio.Buffer.<init>
    0.1% 1 + 0 java.beans.PropertyChangeSupport.firePropertyChang e
    0.1% 0 + 1 java.io.WinNTFileSystem.canonicalizeWithPrefix0
    0.1% 1 + 0 java.util.Scanner.hasNextLine
    0.1% 0 + 1 java.io.WinNTFileSystem.checkAccess
    0.1% 0 + 1 sun.java2d.d3d.D3DGraphicsDevice.initD3D
    0.1% 1 + 0 java.util.regex.Matcher.<init>
    0.1% 1 + 0 java.lang.String.equals
    0.1% 1 + 0 javax.swing.JComponent.setFont
    0.1% 0 + 1 java.lang.ClassLoader$NativeLibrary.find
    0.1% 1 + 0 java.util.concurrent.locks.ReentrantReadWriteLock. <init
    >
    0.1% 1 + 0 javax.swing.JComponent.setBackground
    0.1% 1 + 0 sun.nio.ch.FileChannelImpl.read
    0.1% 1 + 0 sun.awt.windows.WComponentPeer.addNativeDropTarget
    0.1% 0 + 1 java.lang.Object.hashCode
    0.1% 0 + 1 java.io.FileInputStream.available
    0.1% 0 + 1 java.lang.Class.getName0
    12.8% 151 + 9 Total interpreted (including elided)

    Compiled + native Method
    7.6% 95 + 0 java.lang.String.<init>
    6.3% 79 + 0 java.nio.CharBuffer.charAt
    4.5% 56 + 0 java.util.regex.Pattern$Slice.match
    4.2% 52 + 0 java.util.regex.Matcher.search
    3.6% 45 + 0 java.util.regex.Pattern$CharProperty.match
    3.4% 42 + 0 java.lang.AbstractStringBuilder.append
    3.0% 37 + 0 java.util.regex.Pattern$BmpCharProperty.match
    2.8% 35 + 0 java.lang.String.subSequence
    2.6% 32 + 0 java.util.regex.Pattern$Start.match
    2.5% 31 + 0 sun.nio.cs.SingleByteDecoder.decodeArrayLoop
    2.0% 25 + 0 java.util.regex.Matcher.appendReplacement
    1.6% 20 + 0 java.util.regex.Pattern$6.isSatisfiedBy
    1.5% 2 + 17 java.util.regex.Pattern.split
    1.3% 16 + 0 java.util.regex.Pattern$Curly.match0
    1.1% 14 + 0 java.lang.Character.codePointAt
    1.0% 13 + 0 java.util.regex.Matcher.replaceAll
    1.0% 1 + 12 java.util.regex.Pattern.compile
    1.0% 12 + 0 java.io.LineNumberReader.read
    0.9% 0 + 11 java.lang.String.substring
    0.8% 10 + 0 java.nio.Buffer.<init>
    0.6% 7 + 0 java.util.regex.Matcher.find
    0.5% 2 + 4 pcInvpkg.SearchTest$MyModel.<init>
    0.5% 6 + 0 java.util.regex.Matcher.reset
    0.4% 5 + 0 java.util.regex.Pattern$Branch.match
    0.4% 1 + 4 java.util.AbstractList.listIterator
    57.8% 659 + 62 Total compiled (including elided)

    Stub + native Method
    26.5% 0 + 330 java.lang.Object.clone
    1.2% 0 + 15 java.io.FileInputStream.readBytes
    0.7% 0 + 9 java.lang.Thread.isInterrupted
    0.6% 0 + 8 sun.nio.ch.FileDispatcher.read0
    0.2% 0 + 3 java.lang.System.arraycopy
    0.1% 0 + 1 sun.misc.Unsafe.copyMemory
    29.4% 0 + 366 Total stub


    Flat profile of 62.96 secs (2919 total ticks): AWT-Windows

    Interpreted + native Method
    99.8% 2 + 2910 sun.awt.windows.WToolkit.eventLoop
    0.1% 2 + 0 sun.awt.PostEventQueue.postEvent
    0.0% 1 + 0 sun.awt.AWTAutoShutdown.setToolkitBusy
    0.0% 1 + 0 java.awt.EventQueue.wakeup
    99.9% 6 + 2910 Total interpreted

    Compiled + native Method
    0.1% 0 + 2 sun.awt.AWTAutoShutdown.setToolkitBusy
    0.1% 0 + 2 Total compiled

    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 33.46 secs (1675 total ticks): TimerQueue

    Interpreted + native Method
    100.0% 0 + 2 java.lang.Object.wait
    100.0% 0 + 2 Total interpreted

    Thread-local ticks:
    99.9% 1673 Blocked (of total)


    Flat profile of 33.91 secs (1683 total ticks): DestroyJavaVM

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


    Flat profile of 34.55 secs (1691 total ticks): AWT-EventQueue-0

    Interpreted + native Method
    7.4% 0 + 5 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnd
    erCursor
    2.9% 0 + 2 sun.java2d.windows.GDIBlitLoops.nativeBlit
    2.9% 0 + 2 sun.awt.windows.WComponentPeer.hide
    2.9% 1 + 1 sun.awt.windows.WGlobalCursorManager.findComponent At
    2.9% 0 + 2 sun.awt.windows.WGlobalCursorManager.setCursor
    1.5% 0 + 1 sun.awt.windows.WInputMethod.enableNativeIME
    1.5% 0 + 1 sun.awt.windows.WComponentPeer.reshape
    1.5% 0 + 1 java.io.WinNTFileSystem.getBooleanAttributes
    1.5% 0 + 1 sun.awt.windows.WComponentPeer.endValidate
    1.5% 0 + 1 sun.java2d.loops.MaskFill.DrawAAPgram
    1.5% 1 + 0 java.awt.Component.location
    1.5% 1 + 0 java.awt.AWTEventMulticaster.mouseMoved
    1.5% 1 + 0 sun.java2d.pipe.ValidatePipe.fillRect
    1.5% 1 + 0 javax.swing.JTable.getDefaultRenderer
    1.5% 1 + 0 java.util.IdentityHashMap.get
    1.5% 1 + 0 java.awt.RadialGradientPaintContext.fillRaster
    1.5% 1 + 0 java.awt.EventQueue.postEventPrivate
    1.5% 1 + 0 sun.java2d.loops.MaskFill.FillAAPgram
    1.5% 1 + 0 javax.swing.UIDefaults.getResourceCache
    1.5% 1 + 0 java.awt.Rectangle.intersection
    1.5% 1 + 0 javax.swing.plaf.metal.MetalIconFactory$CheckBoxIc on.pa
    intOceanIcon
    1.5% 1 + 0 javax.swing.JTable.getCellRect
    1.5% 1 + 0 javax.swing.text.PlainDocument.insertUpdate
    45.6% 14 + 17 Total interpreted

    Compiled + native Method
    11.8% 0 + 8 java.lang.String.substring
    5.9% 4 + 0 java.awt.RadialGradientPaintContext.simpleNonCycli cFill
    Raster
    2.9% 0 + 2 java.beans.PropertyChangeSupport.firePropertyChang e
    1.5% 0 + 1 java.lang.String.split
    1.5% 0 + 1 sun.java2d.SunGraphics2D.clipRect
    1.5% 0 + 1 java.util.AbstractList.listIterator
    1.5% 0 + 1 java.util.LinkedList.addBefore
    1.5% 1 + 0 javax.swing.UIManager.getLAFState
    1.5% 0 + 1 pcInvpkg.SearchTest$MyModel.getValueAt
    1.5% 1 + 0 java.util.regex.Matcher.search
    1.5% 1 + 0 sun.font.FileFontStrike.getSlot0GlyphImagePtrs
    1.5% 0 + 1 java.awt.EventQueue.setCurrentEventAndMostRecentTi meImp
    l
    1.5% 1 + 0 pcInvpkg.SearchTest$MyModel.use
    1.5% 0 + 1 java.util.regex.Pattern.compile
    36.8% 8 + 17 Total compiled

    Stub + native Method
    5.9% 0 + 4 sun.java2d.loops.Blit.Blit
    2.9% 0 + 2 java.lang.Object.clone
    1.5% 0 + 1 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnd
    erCursor
    1.5% 0 + 1 sun.java2d.loops.MaskFill.FillAAPgram
    1.5% 0 + 1 java.lang.System.identityHashCode
    1.5% 0 + 1 java.security.AccessController.getStackAccessContr olCon
    text
    14.7% 0 + 10 Total stub

    Thread-local ticks:
    96.0% 1623 Blocked (of total)
    2.9% 2 Class loader


    Flat profile of 34.57 secs (1692 total ticks): AWT-Shutdown

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


    Flat profile of 63.07 secs (2927 total ticks): Java2D Disposer

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


    Global summary of 63.15 seconds:
    100.0% 3756 Received ticks
    21.6% 811 Received GC ticks
    0.2% 9 Compilation
    0.3% 10 Other VM operations
    0.1% 2 Class loader
    0.0% 1 Unknown code

    ************************************************** *************************************

    From the IDE:



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

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


    Flat profile of 28.68 secs (1352 total ticks): main

    Interpreted + native Method
    1.7% 23 + 0 java.lang.String.length
    0.6% 0 + 8 java.io.FileInputStream.readBytes
    0.4% 6 + 0 java.util.ArrayList.size
    0.3% 0 + 4 java.lang.ClassLoader.findBootstrapClass
    0.2% 3 + 0 pcInvpkg.readMeclData.returnMecl
    0.2% 3 + 0 java.util.AbstractList$ListItr.nextIndex
    0.2% 0 + 3 java.io.WinNTFileSystem.getBooleanAttributes
    0.1% 0 + 2 java.io.FileInputStream.open
    0.1% 0 + 2 java.util.zip.ZipFile.read
    0.1% 0 + 2 sun.java2d.d3d.D3DGraphicsDevice.initD3D
    0.1% 1 + 0 java.awt.Toolkit.getDefaultToolkit
    0.1% 1 + 0 sun.awt.Win32GraphicsEnvironment.<clinit>
    0.1% 1 + 0 java.io.Reader.read
    0.1% 1 + 0 java.nio.HeapCharBuffer.toString
    0.1% 1 + 0 javax.swing.TransferHandler.<clinit>
    0.1% 1 + 0 javax.swing.JTable.updateSubComponentUI
    0.1% 1 + 0 javax.swing.UIManager$LAFState.<init>
    0.1% 1 + 0 javax.swing.JComponent.addNotify
    0.1% 1 + 0 sun.awt.util.IdentityArrayList.add
    0.1% 1 + 0 javax.swing.JButton.<init>
    0.1% 1 + 0 java.awt.Container.checkNotAWindow
    0.1% 1 + 0 java.util.ArrayList.indexOf
    0.1% 1 + 0 java.util.HashMap.remove
    0.1% 1 + 0 javax.swing.JTable.createDefaultTableHeader
    0.1% 1 + 0 javax.swing.Timer.addActionListener
    7.0% 63 + 31 Total interpreted (including elided)

    Compiled + native Method
    9.9% 134 + 0 java.lang.String.<init>
    9.5% 129 + 0 java.nio.CharBuffer.charAt
    7.2% 97 + 0 java.util.regex.Pattern$Slice.match
    7.0% 95 + 0 java.util.regex.Pattern$CharProperty.match
    6.6% 89 + 0 java.util.regex.Matcher.search
    5.0% 67 + 0 java.util.regex.Pattern$BmpCharProperty.match
    4.7% 64 + 0 java.lang.AbstractStringBuilder.append
    4.3% 58 + 0 java.lang.String.subSequence
    3.7% 50 + 0 java.util.regex.Pattern$Start.match
    3.1% 42 + 0 sun.nio.cs.SingleByteDecoder.decodeArrayLoop
    3.0% 40 + 0 java.util.regex.Pattern$Curly.match0
    2.4% 33 + 0 java.util.regex.Matcher.appendReplacement
    2.2% 30 + 0 java.lang.Character.codePointAt
    1.8% 24 + 0 java.util.regex.Pattern$6.isSatisfiedBy
    1.2% 16 + 0 java.io.LineNumberReader.read
    1.0% 13 + 0 java.util.regex.Matcher.replaceAll
    0.7% 10 + 0 java.lang.StringBuffer.append
    0.6% 8 + 0 java.util.regex.Matcher.reset
    0.5% 7 + 0 java.nio.Buffer.<init>
    0.4% 6 + 0 java.util.regex.Matcher.find
    0.4% 5 + 0 java.util.regex.Pattern$Branch.match
    0.3% 4 + 0 java.util.regex.Pattern$BranchConn.match
    0.3% 4 + 0 java.lang.String.codePointAt
    0.2% 3 + 0 java.util.regex.Matcher.usePattern
    0.2% 3 + 0 java.util.AbstractCollection.toArray
    78.6% 1059 + 3 Total compiled (including elided)

    Stub + native Method
    8.7% 0 + 118 java.io.FileInputStream.readBytes
    3.8% 0 + 51 java.lang.Object.clone
    0.7% 0 + 10 sun.nio.ch.FileDispatcher.read0
    0.1% 0 + 2 java.lang.Thread.isInterrupted
    0.1% 0 + 1 java.lang.Thread.currentThread
    13.5% 0 + 182 Total stub

    Thread-local ticks:
    0.1% 1 Blocked (of total)
    1.0% 13 Class loader


    Flat profile of 45.48 secs (2425 total ticks): AWT-Windows

    Interpreted + native Method
    99.9% 2 + 2421 sun.awt.windows.WToolkit.eventLoop
    99.9% 2 + 2421 Total interpreted

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

    Thread-local ticks:
    0.0% 1 Class loader


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

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


    Flat profile of 14.39 secs (916 total ticks): TimerQueue

    Interpreted + native Method
    33.3% 0 + 1 java.lang.Object.wait
    33.3% 0 + 1 Total interpreted

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

    Thread-local ticks:
    99.7% 913 Blocked (of total)
    33.3% 1 Class loader


    Flat profile of 17.05 secs (1083 total ticks): DestroyJavaVM

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


    Flat profile of 17.43 secs (1104 total ticks): AWT-EventQueue-0

    Interpreted + native Method
    4.2% 0 + 3 sun.java2d.windows.GDIBlitLoops.nativeBlit
    4.2% 0 + 3 sun.awt.windows.WGlobalCursorManager.setCursor
    2.8% 0 + 2 sun.java2d.loops.FillRect.FillRect
    2.8% 0 + 2 sun.awt.windows.WGlobalCursorManager.findHeavyweig htUnderCursor
    1.4% 0 + 1 java.lang.ClassLoader$NativeLibrary.load
    1.4% 1 + 0 java.awt.Font.getSize2D
    1.4% 0 + 1 java.security.AccessController.doPrivileged
    1.4% 1 + 0 javax.swing.border.EmptyBorder.paintBorder
    1.4% 1 + 0 sun.font.FileFont.getGlyphImage
    1.4% 0 + 1 sun.java2d.loops.MaskBlit.MaskBlit
    1.4% 1 + 0 java.awt.Container.findComponentAt
    1.4% 1 + 0 java.awt.Graphics.create
    1.4% 1 + 0 java.awt.Component.getFocusTraversalKeys_NoIDCheck
    1.4% 1 + 0 javax.swing.TimerQueue.sharedInstance
    1.4% 1 + 0 javax.swing.plaf.metal.MetalUtils.drawGradient
    1.4% 1 + 0 javax.swing.plaf.basic.BasicBorders.getRadioButton Border
    1.4% 1 + 0 javax.swing.JTable.prepareRenderer
    1.4% 1 + 0 java.awt.Container.dispatchEventImpl
    1.4% 1 + 0 java.awt.Component.createBufferStrategy
    1.4% 1 + 0 java.awt.image.DirectColorModel.createCompatibleWr itableRaster
    1.4% 0 + 1 sun.dc.pr.PathFiller.cInitialize
    1.4% 0 + 1 sun.awt.windows.WComponentPeer.beginValidate
    1.4% 1 + 0 java.awt.Component.reshape
    40.8% 14 + 15 Total interpreted

    Compiled + native Method
    9.9% 7 + 0 java.awt.RadialGradientPaintContext.simpleNonCycli cFillRaster
    2.8% 2 + 0 java.lang.String.subSequence
    2.8% 2 + 0 sun.font.GlyphList.getGrayBits
    2.8% 2 + 0 pcInvpkg.SearchTest$MyModel.use
    1.4% 1 + 0 java.lang.String.codePointAt
    1.4% 1 + 0 java.util.regex.Pattern$BmpCharProperty.match
    1.4% 1 + 0 sun.java2d.SunGraphics2D.clone
    1.4% 1 + 0 java.awt.Font.equals
    1.4% 1 + 0 java.util.regex.Pattern.atom
    25.4% 18 + 0 Total compiled

    Stub + native Method
    2.8% 0 + 2 sun.java2d.loops.MaskFill.FillAAPgram
    1.4% 0 + 1 java.lang.Thread.holdsLock
    1.4% 0 + 1 sun.java2d.loops.Blit.Blit
    1.4% 0 + 1 sun.java2d.loops.MaskFill.MaskFill
    1.4% 0 + 1 java.lang.Class.getInterfaces
    1.4% 0 + 1 java.lang.Object.getClass
    1.4% 0 + 1 java.security.AccessController.getStackAccessContr olContext
    11.3% 0 + 8 Total stub

    Thread-local ticks:
    93.6% 1033 Blocked (of total)
    22.5% 16 Class loader


    Flat profile of 17.50 secs (1108 total ticks): AWT-Shutdown

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


    Flat profile of 45.48 secs (2426 total ticks): Java2D Disposer

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


    Global summary of 45.73 seconds:
    100.0% 2515 Received ticks
    3.1% 78 Received GC ticks
    0.6% 14 Compilation
    1.2% 31 Class loader

  2. #22
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,813
    Rep Power
    19

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

    You might want to see if there's any difference in the GC strategy employed in the two cases, not that I could tell you how to do that, though I expect there's a way of grabbing those settings at runtime in the code. You can get at most stuff.

    The other to to try and get the MAT up and running and see if the dumps look any different.

    Just looking at the main section up there you have:
    Windows -
    Interpreted + native Method
    6.7% 84 + 0 java.lang.String.length
    3.3% 41 + 0 java.util.ArrayList.size

    Eclipse -
    1.7% 23 + 0 java.lang.String.length
    0.6% 0 + 8 java.io.FileInputStream.readBytes
    0.4% 6 + 0 java.util.ArrayList.size

    I don't know, but those two don't look to me like they were doing the same thing.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #23
    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 Tolls View Post
    You might want to see if there's any difference in the GC strategy employed in the two cases, not that I could tell you how to do that, though I expect there's a way of grabbing those settings at runtime in the code.
    Very interesting. I'll start researching right away. If anyone has any advice on where to look for this, or any information/experience I'd greatly appreciate your insight.

Page 2 of 2 FirstFirst 12

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
  •