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 27792 - Bringing up an external property editor must be responsive
Summary: Bringing up an external property editor must be responsive
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Property Editors (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ tboudreau
URL: http://performance.netbeans.org/respo...
Keywords: PERFORMANCE
Depends on:
Blocks: 26581
  Show dependency tree
 
Reported: 2002-10-03 17:22 UTC by _ rkubacki
Modified: 2008-12-22 22:45 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Timing data on ultra 60 for custom property editor creation (5.29 KB, text/plain)
2003-01-10 15:13 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2002-10-03 17:22:37 UTC
Beginning of action: Click ... button (an
EE-specific property is suggested) (first time
this session)
Initial Feedback: Button appears pushed
Maximum time allowed: 100 ms
Second Feedback: Dialog box appears
Maximum time allowed: 1000 ms
Comment 1 Marian Mirilovic 2002-11-22 11:16:58 UTC
Marian's measurement (time in milliseconds):
conditions: 
 - SUN UltraSparc60 / 512 MB RAM / Solaris 5.8 / CDE
 - JDK1.4.1(01)
 - [nb_dev](200211140100) , MDI
        - mounted sampledir

bring up extrnal operator
 Main - Arguments (String editor)
 		201     132     147
 Color PE      1465    1447    1174

Test cases described on page :
http://performance.netbeans.org/qa/TestSuites.html#bring_up_Arguments_editor
Comment 2 David Simonek 2002-12-06 15:32:19 UTC
changing subcomp to property editors, passing to Tim.
Also note that results of measurements shows that only some of prop
editors are unresponsive (pls compare development x qa measurements,
find out if some numbers differ dramatically and why)
http://performance.netbeans.org/reports/20020919-dialog-numbers.txt 
Comment 3 _ tboudreau 2002-12-06 16:10:38 UTC
What does "external property editor" mean?  One in a dialog?
Can you recommend an EE specific property editor to look at?
Comment 4 Marian Mirilovic 2002-12-06 16:40:22 UTC
Tim , in my opinion it's about all property editors with own dialogs,
like Color Property Editor, Icon property editor, .... .
Comment 5 Marian Mirilovic 2002-12-06 17:08:37 UTC
reassigne to Tim, new owner of property editors.
Comment 6 _ tboudreau 2003-01-09 12:55:25 UTC
See the class ReusableDialog in the property sheet rewrite branch.
It contains some experimental code to bring up a dialog in a "please
wait" state while the
contained component is created on a separate thread.  Further work
is needed, as the code needs to decide when to use a thread based
on some metrics that either it creates and saves, or that are 
provided for it, but it should be possible to make it self-tuning
over time that takes into account the overhead of classloading
on first invocation.

Some baseline metric needs to be found during startup (find some
usually expensive piece of work that does not change with number
of modules and time it) which can be used as a factor in the 
decision to create/not create the component off the AWT thread.
Any suggestions of something that could be used for this?

Also, caching and reusing things like the color editor will help -
the color editor in particular is extremely expensive to create (and
its "recent colors" function is broken because the same instance
is not reused).  A wholesale replacement for this editor or a 
much better inplace editor for colors would also help.


Comment 7 _ tboudreau 2003-01-10 15:11:35 UTC
FYI, I added some logging code to ReusableDialog to see how much
time was spent in somePropertyEditor.getCustomEditor() on my Ultra60.

Aside from classloading on first invocation, most editors are fairly 
well behaved.  The following classes are the poorest performers:

org.netbeans.beaninfo.editors.ColorEditor$NbColorChooser - +/-1 second
on first invocation, a little over 1/2 second on second

org.netbeans.beaninfo.editors.ServiceTypePanel - +/- 1/2 second first
invocation, 60ms second invocation, ~20ms later invocations.  
Appears to be weakly cached somewhere, as the time goes back up
if not invoked for a while.

org.netbeans.modules.form.FormCustomEditor - 851ms first invocation,
~200 later invocations

org.netbeans.beaninfo.editors.PropertiesCustomEditor (looks like
classloading for the props editor) - 912ms first invocation, ~35 later
invocations


Note that it may only be possible to use the ReusableDialog approach
for classes known *not* to return a Window subclass from
getComponent().  This is probably solvable through the XML 
registration process.
Comment 8 _ tboudreau 2003-01-10 15:13:01 UTC
Created attachment 8526 [details]
Timing data on ultra 60 for custom property editor creation
Comment 9 _ tboudreau 2003-01-23 17:58:22 UTC
Fixed in trunk.  Now displays wait cursor immediately when the button
is pressed, and restores the cursor once it is displayed.

It may be possible to do some further optimizations with the 
property sheet rewrite.