Rob,
On Fri, Oct 11, 2002 at 04:37:0p -0500, Rob Ratcliff wrote:
> > This could be due to the 10 Mb network card you have on this
> > machine. See more on this below
>
> I performed an experiment today where we throttled down the network
> connection to my 1.8 GHz PC to 10 Mbs. When I attempted to
> display the Java applet on my local WinaXe server, even though
> -Dsun.java2d.pmoffscreen=false was set, the performance
> was just as bad as it was on the HPUX 10.2 box. So it looks like the 10Mbs
> isn't sufficient for the current implementation
> of Java2D. (By the way, the only Java2D features used in this applet
> currently are thick lines a rectangle filled with a
> semi-transparent color.)
The semi-translucent color is the problem: since X doesn't have
translucency, we have to render this by ourselves, and to do that,
we have to read the pixels from the destination surface over the
wire, do the compositing, and then put the modified pixels
back. That's quite a lot of traffic.
Can you avoid using translucent color?
I don't think thick lines would affect you as much.
(ready to be corrected)
> One odd thing about this performance issue is that our Dialogs never paint
> when they are popped once any Java2D call is made.
> You can get some of the widget to show up by scrubbing it with your mouse
> pointer. So even if we could live with the slow
> response, the paint problem in the dialogs shuts us down.
This is strange and sounds like a bug. If you can create a simple
testcase and send it to me, I'll take a look. Which configuration is
that? Did you see that with 100Mb line?
> > Please make sure you have the latest revision of this patch: 109154
> > (run 'showrev -p | grep 109154' to check the revision)
> > Current revision for Solaris 8 is -15.
>
> Thanks, that patch fixed the black rectangle problem. BTW, the jumbo patch
> set distributed with
> JDK 1.4.1 for Solaris 8 doesn't include that patch.
I guess this is it's a patch to a device driver, which only some of
users have. But I'll investigate this, may be it should be added to
the jumbo patch.
> > Try to run your app with the following env. variable set:
> > J2D_PIXMAPS=shared
> >
> > You might want to increase the amount of shared memory
> > in the system (by default it's just about 1M, which is way
> > to small):
> > To change the default settings on Solaris, modify system's settings
> > in /etc/system : add, for example, the following lines, then reboot:
> > set shmsys:shminfo_shmmax=10000000
> > set shmsys:shminfo_shmmni=200
> > set shmsys:shminfo_shmseg=150
>
> Simply setting J2D_PIXMAPS didn't fix the performance problem. But after I
> changed the shared memory
> settings like you suggested, the performance did improve quite a bit.
> Although, it turned out that using
> -Dsun.java2d.pmoffscreen=false without J2D_PIXMAPS was faster for some
> reason. (I tested this by resizing
> a rectangle filled with a semi-transparent color.)
So were you rendering to the screen or to the offscrreen image?
Note that if you have a swing application, then you're
double-buffered, that means that you're rendering to the offscreen
image.
If that's the case, then it's possible that turning off the
the acceleration of offscreen images with pmoffscreen=false could
actually help you in this case.
But in this case you'd probably loose some performance on operations
like scrolling.
> So it looks like we're kind of hosed on machines with 10 Mbs ethernet
> cards. Do you know of any other tricks to
> get the rendering to improve across X such as using less colors, or less
> resolution?
Try not to use translucent colors, antialiasing, or do compositing
operations (Graphics2D.setComposite() method).
Running in 8 bit mode might improve performance as well, as there
will be less data to transfer.
Thank you,
Dmitri
===========================================================================
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".