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 40271 - Context menu on XML object is slow
Summary: Context menu on XML object is slow
Status: CLOSED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-02-19 12:30 UTC by _ rkubacki
Modified: 2004-08-23 14:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
List of classes loaded into the VM when right-clicking a XML node. (6.37 KB, text/plain)
2004-02-23 14:17 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-02-19 12:30:29 UTC
The first invocation of context menu on exceeds UI
responsiveness limit (100ms). Moreover the numbers
are worse than in NB3.5.1. Next invocations are
slightly worse on WinXP and they are close to
100ms boundary.

Measurements from NB 200402171900 on
J2SKD1.4.2_03, Linux, Solaris, WinXP and
comparision to NB3.5.1:

Xml File node popup (1)  247 ms (+7.1%)  344 ms
(+6.5%)  240 ms (+32.4%)
Xml File node popup (2) 100 ms (-19.9%) 146 ms
(-8.4%) 105 ms (+13.1%)
Comment 1 Petr Pisl 2004-02-19 16:35:46 UTC
Hi Radim,

it's strange that the times are worse in 3.6 than in 3.5.1, because we
didn't any change in xml module. Could you measure how long takes
individual items in the context menu?
Comment 2 Petr Jiricka 2004-02-23 14:16:36 UTC
Attaching the list of classes which are loaded by the VM after
right-clicking the node. What I did exactly is the following:

1. Start IDE
2. Create XML file
3. Close the XML editor that was just opened
4. Restart IDE
5. Expand folder containing the XML file
-> start counting the loaded classes
6. Right-click on the XML file
-> stop counting the loaded classes

Radim, could you please estimate how much time is consumed by
classloading in this case? Thanks.
Comment 3 Petr Jiricka 2004-02-23 14:17:38 UTC
Created attachment 13573 [details]
List of classes loaded into the VM when right-clicking a XML node.
Comment 4 _ rkubacki 2004-02-23 17:18:48 UTC
I tried to run the action on Solaris ULTRA60 in Analyzer with 1ms
sampling. Build from Feb 18, J2SDK1.4.2_03. 

1st try: Call the menu on XML menu as the first menu. The first menu
invocation took 1.9s (15-20% overhead). This included initialization
of lookup called from o.n.m.xml.core.actions.CollectSystemAction. Then
the same class creates popup presenter (~90ms). The rest of menu is
created and shown. 5 GC cycles happened. Some class loading and bundle
reading. 

Maybe it is possible to speed up
o.openide.loaders.XMLDataObject.InfoParser.waitFinished where
FileObject.getURL is called too often.  

I will try to profile it again w/ not as a first menu.
Comment 6 Petr Jiricka 2004-02-25 09:30:39 UTC
Radim, thanks. Could you please measure this again after the
improvement? Will the fix also affect issue 40373?

Also, what are the responsiveness criteria for the first invocation of
popup menu? Are they the same as subsequent invocations, or different?
Thanks.
Comment 7 _ rkubacki 2004-02-25 10:32:33 UTC
Yes, the issue #40273 is affected too. Also invocation of Tools main
menu. All these test showed an improvement for yesterdeay's build
(200402241900). I will double checked with next couple of builds.

The criteria are the same. IMO it is acceptable to tolerate some small
difference. Typically if we can justify with some analysis and
measurements. And for the testing it is almost requirement to track
both numbers as they behave differently.
Comment 8 Martin Schovanek 2004-02-25 10:53:33 UTC
I agree that performance is important for us. But in my opinion it is a bit
risky make a code optimization to promo-B now. This case does not affect users
too much. That's why I (XML QE) propose to postpone the bugfix.
Comment 9 _ rkubacki 2004-02-25 17:24:33 UTC
Martin, I share your concern that each integration has to be carefully
evaluated especially now as we are in stabilization phase. OTOH we
cannot ingore problems. Yes we have hundreds of different use cases in
the product. Each of them has some weight and each contributes to
overall perception. Anyone can come with your justification for almost
all these cases. The result will be unusable product.

OK, I read your statement as - QA does not insist on fixing this in
3.6 timeframe.
Comment 10 Petr Jiricka 2004-02-26 10:41:17 UTC
Radim, it would be great if you could do new measurements after your
partial fix, and then we can decide on further actions. Thanks.
Comment 11 _ rkubacki 2004-02-26 14:10:18 UTC
IMO we can close this as fixed for 3.6 release and file new one to
improve 1st invocation with a TM = 4.0.
Comment 12 Petr Jiricka 2004-02-27 09:28:09 UTC
Ok, per previous discussion, marking as fixed.
Comment 13 dmladek 2004-08-23 14:41:52 UTC
closing it....no actin done after fix in 3.6