This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 78346

Summary: UML performance issue on Mac OS X when scroll bars exist for the diagram window
Product: uml Reporter: bugbridge <bugbridge>
Component: General DiagramAssignee: issues@uml <issues>
Status: VERIFIED FIXED    
Severity: blocker CC: issues, petersl
Priority: P1    
Version: 5.x   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 102545    
Attachments: creation-thread-dump
creation-thread-dump2
creation-thread-dump-noflag
creation-thread-dump-noflag2
creation-thread-dump-noflag2
thread-dump-layout
thread-dump-move-class
thread-dump-popup-menu-on-class
thread-dump-popup-menu-on-class
thread-dump-scroll
thread-dump-scroll2

Description bugbridge 2006-06-19 22:04:31 UTC
Original status: 1-Dispatched; Suggested Status: NEW

These items should be added to the Keywords: PERFORMANCE
Original submitter: petersl

Description:
Coke milestone build tpr2 on MacOS ppc & intel platforms.

Before the diagram window scroll bars show up, all actions are responded within
reasonable time. Once scroll bars show up, any action takes 3 to 5 seconds to
respond, eg, create a new element, click on an element to select, move an
element to a different location, popup the context menu for an element, click on
the scroll bar or scroll bar arrow to scroll, etc.

While the performance issue is there, doing a relayout with any layout style
will re-gain the normal action response time. Sometimes scroll bars exist as a
result of a relayout, the performance issue still does not exist. However,
manaully moving elements out of the visual drawing area to enable the scroll
bars will result in the performance issue consistently.

See attached thread dumps when the performance issue exists for different actions.
The first set of dumps starting with "thread-dump-" were taken on MacOS/intel
platform with the -J-Dapple.awt.graphics.UseQuartz=false flag for different action.

The 2nd set of dumps starting with "creation-" were taken during element
creation when the performance issue first started. 2 dumps were taken with the
flag and 2 were taken without the flag.

Evaluation:
Here are the testing result for different OS and JDK combinations:
- OSX 10.4.5 and JDK 1.5.0_06, the performance problem does NOT exist
- OSX 10.4.5 and JDK 1.5.0_05, the performance problem STILL exists

SEE Attachments in BT issue.
Comment 1 Peter Lam 2006-09-27 22:34:37 UTC
To clarify the testing results in the Evaluation section, note that
"-J-Dapple.awt.graphics.UseQuartz=false" flag is used in the testing for
invoking IDE in these configurations.

- OSX 10.4.5 and JDK 1.5.0_06, the performance problem does NOT exist
- OSX 10.4.5 and JDK 1.5.0_05, the performance problem STILL exists
Comment 2 Peter Lam 2006-09-27 22:39:26 UTC
Created attachment 34624 [details]
creation-thread-dump
Comment 3 Peter Lam 2006-09-27 22:39:44 UTC
Created attachment 34625 [details]
creation-thread-dump2
Comment 4 Peter Lam 2006-09-27 22:40:06 UTC
Created attachment 34626 [details]
creation-thread-dump-noflag
Comment 5 Peter Lam 2006-09-27 22:40:23 UTC
Created attachment 34627 [details]
creation-thread-dump-noflag2
Comment 6 Peter Lam 2006-09-27 22:40:29 UTC
Created attachment 34628 [details]
creation-thread-dump-noflag2
Comment 7 Peter Lam 2006-09-27 22:40:46 UTC
Created attachment 34629 [details]
thread-dump-layout
Comment 8 Peter Lam 2006-09-27 22:41:03 UTC
Created attachment 34630 [details]
thread-dump-move-class
Comment 9 Peter Lam 2006-09-27 22:41:27 UTC
Created attachment 34631 [details]
thread-dump-popup-menu-on-class
Comment 10 Peter Lam 2006-09-27 22:41:56 UTC
Created attachment 34632 [details]
thread-dump-popup-menu-on-class
Comment 11 Peter Lam 2006-09-27 22:42:17 UTC
Created attachment 34633 [details]
thread-dump-scroll
Comment 12 Peter Lam 2006-09-27 22:42:42 UTC
Created attachment 34634 [details]
thread-dump-scroll2
Comment 13 Peter Lam 2006-10-26 01:27:40 UTC
workaround: add flag "-J-Dapple.awt.graphics.UseQuartz=false" flag to
netbeans_default_options will solve the problem in jdk 1.5.0_06. This bug has
already been fixed in jdk 1.6.0 so the flag is not needed if using jdk 1.6.0.
Comment 14 wegus 2006-11-16 12:57:10 UTC
Zooming and Scrolling result in an unusable UML-Tool, even on a 2.5GHz Dual G5
PowerMac with 2GB RAM a Diagramm with 8 Classes or mor could not be handled in
acceptable speed!

Highly need for Performance Issues to be done!!!
Comment 15 Sergey Petrov 2007-03-06 17:27:23 UTC
works on 1.5 with flag from  Issue 78346 (initially suggested as flag for
performance improvement)
Comment 16 Sergey Petrov 2007-03-06 17:28:36 UTC
please ignore last comment
Comment 17 Peter Lam 2007-03-19 21:16:41 UTC
Add a reference to the Apple bug filed. The Apple's bug# is 4453351. Apple
already closed this bug since the problem is no longer reproducible with the
latest build of Java SE 6.0 Release 1 DP6 as indicated in bug 4453351.
Comment 18 George Vasick 2007-07-13 16:26:35 UTC
Waiver candidates from 7/12/2007 bug scrub.
Comment 19 _ tboudreau 2007-09-18 05:31:53 UTC
Assuming you're using JScrollPane, there are several repaint strategies available for JScrollPane.  Possibly simply using a different scroll mode for the viewport 
could offer a workaround.  Was this tried?
http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JViewport.html#setScrollMode(int)
Comment 20 George Vasick 2008-01-04 17:10:31 UTC
Depends on the port to the netbeans graph library, currently scheduled for after
6.1.
Comment 21 George Vasick 2008-05-31 00:38:55 UTC
Problem is no longer present with latest Mac JDK and port to NB visual library.
Comment 22 Peter Lam 2008-08-12 00:55:18 UTC
verified in build 20080807. Problem no longer exists in NB 6.5.