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 85037 - Very slow update of schema view when making big change
Summary: Very slow update of schema view when making big change
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sonali Kochar
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 89268
  Show dependency tree
 
Reported: 2006-09-15 18:48 UTC by Nathan Fiedler
Modified: 2008-03-25 05:23 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Fiedler 2006-09-15 18:48:13 UTC
Related to issue 84219, there is a UI update performance problem with respect to
making a large change in one or more models.

- Open the flattened OTA schema (the 800KB giant)
- Open a new, empty schema file
- Tile the two windows so they are above/below or left/right of each other
- Select all of the complex types in OTA and invoke the Cut operation
- Select the "Complex Types" node in the empty schema, invoke Paste
- Wait, and wait, and wait...

The update of the columns/tree view is very slow. My simple suggestion is to
have the model listener code queue up a refresh operation on the AWT event
thread so long as another refresh has not already been queued. This could be
done using a synchronized boolean field, which is set when the refresh is put on
the AWT queue, and cleared when the refresh begins. In this way, we would
probably do far fewer visual updates in response to a large number of model events.
Comment 1 bhate 2006-09-21 01:17:02 UTC
->nathan
Comment 2 Nathan Fiedler 2006-09-23 01:53:30 UTC
Using the NetBeans profiler, it appears that most of the time is spent in the
model code, not the tools layer. I am not, however, convinced as to which module
is the culprit. Lowering the priority, as the test scenario is not realistic
(the flattened OTA schema is not a real world example).
Comment 3 Samaresh Panda 2007-01-11 20:26:54 UTC
Must be investigated and resolved.
Comment 4 Samaresh Panda 2007-01-17 00:15:23 UTC
This is a batch operation and as expected takes a while. After several other
performance fixes (87151 and 89271), I thought this works pretty well, except
that I got some assertions.

Fix for assertion:
Checking in AXIModelImpl.java;
new revision: 1.1.2.42.6.7; previous revision: 1.1.2.42.6.6
Comment 5 tonybeckham 2007-02-12 21:29:09 UTC
After testing Coke vs Milestone 6 the improvements are:
from about 15 seconds to perform the actions described to around 5 seconds to
perform the same action in milestpone 6.  Marking issue as VERIFIED.
Comment 6 Chris Webster 2007-02-12 22:32:30 UTC
The current timing is approximately 5 seconds to cut all the complex types in
OTA. In order to close this issue, we need to profile this scenario to determine
what the root cause of this issue is. If the problem is that the cut and paste
framework only supports single operations then we should open an issue in the
correct category and add a dependency on it. 
Comment 7 Jiri Prox 2007-09-17 21:43:13 UTC
Obsolete milestone, please reevaluate
Comment 8 tonybeckham 2007-09-26 23:41:29 UTC
Multiple Cut/Copy/Delete for XML schema is not supported in 6.0.
Comment 9 tonybeckham 2007-10-03 18:46:39 UTC
Now it is being supported again for 6.0. but it does not work exactly the same way.  For instance, the cut operation
does not remove the selection until it has been pasted somewhere else.  Because of this measurements that say 15 sec, or
5sec for the cut time are no longer relevant.  The relevant thing is the time it takes to complete the whole cut and
paste operation, the pasting being the bulk of the work done.
 
With NetBeans IDE Dev (Build 200710030000) The time it takes to cut all OTA's complex types and paste them in an empty
schema is approx: 2min 45sec.

I think that this is a fairly reasonable number considering how much is going on.  I want to reopen this because it is
valid but if the time is acceptable for Sam and Sonali we can close it as fixed.
Comment 10 Samaresh Panda 2007-10-20 02:32:17 UTC
IMO, this is fairly reasonable. There is always room for improvement, however, given the size of the schema and the
use-case in question, I think this is OK. The point is, to check the performance of cut-paste for a bulk of components
and I did some testing by cut-pasting 25-30 components at a time and it is pretty good.
Comment 11 Samaresh Panda 2008-03-25 05:23:54 UTC
The use-case is very unrealistic and user has to pay the price for such an operation.