I have a window that is taking up a lot of CPU from the EDT to draw,
whereas several other windows doing similar operations do not.  When I
profile (using OptimizeIt) showing just this problematic window, I get
that the AWT-EventQueue-0 thread spends 34% of its time in
sun.java2d.pipe.DrawImage.blitSurfaceData():

   34.20% - 3330 ms - sun.java2d.pipe.DrawImage.renderSurfaceData()

getting there from java.awt.EventQueue.dispatchEvent().  When I profile
showing just a non-problematic window, this thread spends only 3% if its
time in renderSurfaceData.  In fact, they have very different sets of
calls for under RepaintManager.paintDirtyRegions(). (I've attached the
two profiles -- data.html is for the problematic window.)

[I tried attaching in a previous post, but I think my mail tool had a
problem with them. I've listed the callstacks following this text. Sorry if
this ends up being a duplicate post. Having many problems with mailtool.]

I even commented out the majority of what is displayed so that the
window is pretty much blank, but is still using about half of the CPU.

What would cause one window to use a slower renderSurfaceData?

Brian

Slower window callstack from profile:
java.awt.EventDispatchThread.run()
java.awt.EventDispatchThread.pumpEvents()
java.awt.EventDispatchThread.pumpEvents()
java.awt.EventDispatchThread.pumpEventsForHierarchy()
java.awt.EventDispatchThread.pumpOneEventForHierarchy()
java.awt.EventQueue.dispatchEvent()
java.awt.event.InvocationEvent.dispatch()
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run()
javax.swing.RepaintManager.paintDirtyRegions()
javax.swing.JComponent.paintImmediately()
javax.swing.JComponent._paintImmediately()
javax.swing.JComponent.paintDoubleBuffered()
javax.swing.JComponent.paintWithOffscreenBuffer()
sun.java2d.SunGraphics2D.drawImage()
sun.java2d.SunGraphics2D.drawImage()
sun.java2d.pipe.ValidatePipe.copyImage()
sun.java2d.pipe.DrawImage.copyImage()
sun.java2d.pipe.DrawImage.copyImage()
sun.java2d.pipe.DrawImage.copyImage()
sun.java2d.pipe.DrawImage.renderSurfaceData()
sun.java2d.pipe.DrawImage.blitSurfaceData()

Faster window callstack from profile:
java.awt.EventDispatchThread.run()
java.awt.EventDispatchThread.pumpEvents()
java.awt.EventDispatchThread.pumpEvents()
java.awt.EventDispatchThread.pumpEventsForHierarchy()
java.awt.EventDispatchThread.pumpOneEventForHierarchy()
java.awt.EventQueue.dispatchEvent()
java.awt.event.InvocationEvent.dispatch()
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run()
javax.swing.RepaintManager.paintDirtyRegions()
javax.swing.JComponent.paintImmediately()
javax.swing.JComponent._paintImmediately()
javax.swing.JComponent.paintDoubleBuffered()
javax.swing.JComponent.paintWithOffscreenBuffer()
javax.swing.JComponent.paint()
javax.swing.JComponent.paintChildren()
javax.swing.JComponent.paint()
javax.swing.JComponent.paintChildren()
javax.swing.JComponent.paint()
javax.swing.JComponent.paintChildren()
javax.swing.JComponent.paint()
javax.swing.JComponent.paintChildren()
javax.swing.JComponent.paint()
javax.swing.JComponent.paintChildren()
javax.swing.JComponent.paint()
javax.swing.JComponent.paintChildren()
javax.swing.JComponent.paint()
javax.swing.JComponent.paintComponent()
javax.swing.plaf.ComponentUI.update()

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to