Hi Rob,

Rob Ratcliff wrote:
Hi Dmitri,

Dmitri Trembovetski wrote:

  But in short, you'll need to minimize the amount of
  rendering which is not supported by the X protocol if
  you're expecting your application to be used in remote
  X situations.
It may be used remotely, but currently we're trying to get it to run
without excessively loading up the local X-Server
I think we should probably add a -nonFancyMode flag to our app where it
doesn't use translucent panels or gradient shading on machines with
older graphics cards or when remoting the app.

  Yes, that would be a good idea. It doesn't even have to be
  automatic - one can add an option for the user to switch at
  runtime.

  In the local server case, have you tried setting
  this env. variable: J2D_PIXMAPS=shared . It may help.
Oddly enough, when we use "shared", the X-Server load goes up quite a
bit (on the order of 30-50%), whereas when we use "server", the X-Server
load goes down to more normal levels (like 5-10%).
Why would that be on a local box? Seems like shared memory would be more
efficient? (using sun.java2d.pmoffscreen=true for both cases)

  That would be my assumption as well. Not sure why would
  that not be the case.

  And, you can always programmatically set
  -Dsun.java2d.pmoffscreen=false in your application (just
  make sure you set it before any gui is initialized).
That's a good idea. In the past, we've put that in the scripts, which
would detect whether the display variable was set to the local display
or the remote display. We also had to put in logic to detect certain
graphics cards since they responded differently as well.

BTW, (you all might have considered this already) it might be nice to
have a command line setting like -bestSettings where the Java2D layer
could attempt to automatically measure and configure itself with the
most optimal settings for lowest overall load (Java Application+XServer)
and graphics responsiveness at least for the client and server running
on the same box. It can take some time to manually figure the optimal
combination of environment variables and command line settings to create
the best performing application especially when it seems that different
X-Server/graphics card tends to require different settings. (For
instance, on certain Linux boxes, it was more efficient to use
pmoffscreen=true even when remoting the application from the Solaris box
when on a fast network.)

  I think it would be very hard to determine such best settings.
  The main issue is that each application may behave differently -
  so we couldn't do it just once during the installation of the jre,
  for example. And, of course, people can use different DISPLAY from
  the one that the jre was installed with (happens all the time
  with server boxes). To do something like this every time during
  startup would have a startup time impact.

  In general we rely on that the developers know better about what
  their application does and how it behaves. Any heuristics we
  could come up with will help some and hurt others - this was proven
  many times already.

  But the developer can have (like you suggested) a "no fancy mode" in
  the application appropriate for the conditions, or key off the user
  input.

  Thanks,
    Dmitri



Thanks again!

Rob


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