United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6362233 : RFE: ability to detect when displaying on remote X11 display

Details
Type:
Enhancement
Submit Date:
2005-12-12
Status:
Open
Updated Date:
2011-04-29
Project Name:
JDK
Resolved Date:
Component:
client-libs
OS:
linux
Sub-Component:
java.awt
CPU:
x86
Priority:
P4
Resolution:
Unresolved
Affected Versions:
5.0
Targeted Versions:

Related Reports

Sub Tasks

Description
A DESCRIPTION OF THE REQUEST :
Rendering to a remote X11 display can be slow. Especially when anti-aliasing and alpha are involved. For examples, see bugs 4488401 and 4723006.

It's easy enough for us as developers to implement two different paths, one expensive and fancy for local displays; the other cheap and nasty for remote displays. But without a way to easily detect which situation we're in, the user has to manually configure the application to get the best behavior.

JUSTIFICATION :
Without such an enhancement, there's no way to automatically do the right thing.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I'd like to be able to tell from the GraphicsEnvironment whether I'm dealing with a remote X11 display. (Potentially, it would be interesting to know if I was on criminally bad local hardware, too. But remote X11 displays are the only problem I've had in real life.)
ACTUAL -
As far as I can tell, an X11GraphicsEnvironment looks the same whether it's local or remote. And there's certainly no public intention-revealing API for telling the difference.

CUSTOMER SUBMITTED WORKAROUND :
The best I've come up with is forcing the user to manually disable fancy visual effects.

In theory, I guess we could time stuff, but that's difficult because the obvious point to try to detect our situation is start-up where performance is weird anyway because the VM's still loading/compiling stuff as it goes.

                                    

Comments
EVALUATION

I don't know if there is any native API to find if an application is run on local or remote display. The only way I've found in man is to analyse hostname part of $DISPLAY. In any case it is too late for Mustang to implement this RFE.
                                     
2005-12-16



Hardware and Software, Engineered to Work Together