Bug 194306 - Slow graphics in all windows when any Java3D window is open
Slow graphics in all windows when any Java3D window is open
Status: RESOLVED INVALID
Product: platform
Classification: Unclassified
Component: Window System
7.0
Macintosh Mac OS X
: P2 (vote)
: 7.0
Assigned To: Stanislav Aubrecht
issues@platform
: PERFORMANCE, PLATFORM, UI
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-13 14:44 UTC by billooms
Modified: 2011-01-21 15:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description billooms 2011-01-13 14:44:27 UTC
When Java3D is used in a TopComponent, repaint time in any other TopComponent is extremely slow. This is only an issue with a Netbeans Platform application on a Mac computer and has not been observed on Windows 7.

A simple test case is attached. 

1. Create a new NetBeans Platform application.

2. Add a new module, and add a new window called Window2D. Add a JPanel with some 2D graphics (see attached file for Window2DTopComponent.java which includes class EditPanel). Clicking the mouse within the panel causes 100 small circles to be drawn.

3. Add a new module, and add a new window called Window3D. Add a JPanel with some 3D graphics (see attached file for Window3DTopComponent.java which includes class Basic3DPanel). This panel shows a single 3D cube.

When Window3D is open, click anywhere in Window2D which causes a repaint() at the clicked location. The repaint time is extremely slow (about a second to draw 100 little circles). Close Window3D, and the repaint time is normal (i.e. very fast). The problem is observed under NetBeans 6.9.1 and under NetBeans 7.0 Beta (Build 201011152355). In a real program, graphics response in any other window is intolerably slow whenever a 3D window is open.

This problem has been observed on a desktop Mac Pro (2.66Hz Quad core) with repaint times of about 1 second for 100 2D shapes in a window. Also observed on a MacBook Pro. Both running OS X 10.6.6 with latest software updates and latest Java. It did not occur when the test case was running on Windows 7 (bootcamp on the same Mac Pro computer). This indicates a MacOSX-only problem.

The simple test case was also run using JFrames (i.e. not running on the NetBeans platform) and there was no problem. This indicates a NetBeans Platform issue, not a generic Java/Java3D/Mac problem.

Note: Windows users will have to encapsulate the Java3d .jar files in a Library Wrapper Module. (This is not required on Mac's because Java 3D is already part of the system).
Comment 1 nicklas.lof 2011-01-21 15:37:59 UTC
I did answer this on the mailing list that setting -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true is needed to speed up the graphics on Mac and that fixed it.
Comment 2 Stanislav Aubrecht 2011-01-21 15:50:39 UTC
closing as invalid - see the last comment

nicklas, thanks for the tip!
Comment 3 billooms 2011-01-21 15:53:08 UTC
Thank you. That works.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo