Hi Rob,

  what java version are you using? We have made some improvements in
  jdk7 so that we don't send extra requests to the server.

  Although looking at the requests it appears that the top
  ones might belong to AWT, not 2D - which would explain
  why you didn't see any difference when trying the Java2D
  flags.

  Thanks,
    Dmitri


Rob Ratcliff wrote:
Hi,

I'm troubleshooting a fairly large application built on top of the NetBeans 6 
platform that is causing the X-Server to chew up up a lot (30%-50%) CPU when 
all it seems to be doing is refreshing a blank (no data) Map (we're using 
Openmap) once a second. (I'm going verify that this week and ensure the entire 
app isn't getting repainted or revalidated once a second or more.) It is 
running locally and I'm running it with the -J-Dsun.java2d.pmoffscreen=true. 
(I've tried false as well.) The Java process is only taking 5% or so compared 
to the X-Server load.

In comparison, a similar application (uses OpenMap, but not built on NetBeans) 
we have uses only 2-5% total CPU with the map populated and updating more than 
once a second.

I've tried all the flags documented in the Java2D whitepaper 
(http://java.sun.com/products/java-media/2D/perf_graphics.html), but I haven't 
been as fortunate this time for a quick fix. (I did use the -J option to pass 
the VM option through the NetBeans exec to the VM.)

(BTW, this is a Sun Blade 2000 UltraSparc III+ with a GFX-450 Graphics card, 
running Solaris 8. It has 4 GB of memory and I significantly increased the 
shared memory segments from the defaults.)

To get some insight into what was going on, I used the X-Server proxy, xmon, to 
monitor the X-Event traffic to see what was going on and noticed that there 
seems to be a lot of X-Event traffic. I was expecting more bitmap type 
operations where the Swing's buffered image would be sent to the local X-Server 
rather than the nearly 2000 primitive draws per minute. It is almost as if 
Swing isn't double buffering.

I've also tried using the  -J-Dsun.java2d.trace=<optionname>,<optionname> to 
get a log of the messages, but nothing was printed. (I've tried it on Java 5 and 6.) Does 
that work on the newer versions of the VM. (I need to run a test as well outside of the 
NetBeans app to see if the NetBeans platform is intercepting it somewhere.)

Does anybody have some suggestions on what might be going on?

Thanks!

Rob

--------------------------xmon 
summary---------------------------------------------

requests received (for about 1 minute):
code  count  name
  1     9    CreateWindow
  2    29    ChangeWindowAttributes
  3     4    GetWindowAttributes
  4     4    DestroyWindow
  8     6    MapWindow
 10     1    UnmapWindow
 12    20    ConfigureWindow
 14     4    GetGeometry
 15     4    QueryTree
 16    83    InternAtom
 17     1    GetAtomName
 18   129    ChangeProperty
 19    11    DeleteProperty
 20   326    GetProperty
 23     2    GetSelectionOwner
 24   317    ConvertSelection
 25     4    SendEvent
 36     1    GrabServer
 37     1    UngrabServer
 40     2    TranslateCoordinates
 42     7    SetInputFocus
 43   615    GetInputFocus
 45    19    OpenFont
 46     2    CloseFont
 47    18    QueryFont
 53    51    CreatePixmap
 54    36    FreePixmap
 55    81    CreateGC
 56   2979    ChangeGC
 59   2027    SetClipRectangles
 60    48    FreeGC
 61     2    ClearArea
 62   497    CopyArea
 66   1605    PolySegment
 67   246    PolyRectangle
 69     3    FillPoly
 70   1615    PolyFillRectangle
 72   490    PutImage
 73     8    GetImage
 78     2    CreateColormap
 84    36    AllocColor
 93    17    CreateCursor
 94     2    CreateGlyphCursor
 97    28    QueryBestSize
 98     8    QueryExtension
101     1    GetKeyboardMapping
117     1    GetPointerMapping
119     2    GetModifierMapping
events received (for about 1 minute):
code  count name:
  6    81    MotionNotify
  7     8    EnterNotify
  8     8    LeaveNotify
  9    11    FocusIn
 10    12    FocusOut
 12    11    Expose
 17     1    DestroyNotify
 18     1    UnmapNotify
 19     2    MapNotify
 21     2    ReparentNotify
 22    13    ConfigureNotify
 28   783    PropertyNotify
 31   319    SelectionNotify
 33     5    ClientMessage
errors received:
code  count  name
 10     1    Access

===========================================================================
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".

===========================================================================
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