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 114798 - Code completion is slow at the end of OTA schema
Summary: Code completion is slow at the end of OTA schema
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-09-05 17:40 UTC by Mikhail Matveev
Modified: 2016-07-07 09:56 UTC (History)
1 user (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 Mikhail Matveev 2007-09-05 17:40:49 UTC
1. Create OTA schema.
2. Move to 
3. Choose tag like </xs:element>.
4. Remove part of this tag, leave </xs:elem
5. Ctrl-Space to invoke code completion.
Result: nothing happens.
No exceptions in log.
Same for newLoanApplication and newPurchaseOrder schemas works well
P2 for now, but now sure that it's not a stopper...
Comment 1 Samaresh Panda 2007-09-05 17:58:21 UTC
I'll consider this as a P3.
Comment 2 Mikhail Matveev 2007-09-06 15:34:29 UTC
More generic scenario.

1. Create OTA schema.
2. In Source View, move to some position near the end of file.
3. Type some incompleted tag or remove part of existing one.
3. Invoke code completion.
Result: "Please wait..." message for a long time. I waited about 5 minutes. After this, either right code completion
menu or "No suggestions" (this is wrong) message appear.

Same near the start of file works correctly.

In my opinion, it's at least P2.

See also issue 114903.
Comment 3 Samaresh Panda 2007-09-06 22:21:27 UTC
I tried what you mentioned in the bug. First of all it takes <10 sec for me. And secondly, there will be a performance
penalty for such schemas. I'm not sure what took 5mins in your case. IMO, this is a P3.
Comment 4 tonybeckham 2007-09-11 18:19:51 UTC
Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709100000) 
Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)

CC works for me as described in both cases.  Also it takes only several seconds for the completion to occur.
Comment 5 tonybeckham 2007-09-11 18:24:29 UTC
CC is much faster when you just remove part of an existing tag in OTA.  If I try and add a new tag then it takes more
like 20 seconds before suggestions come but nevertheless it is working.
Comment 6 Mikhail Matveev 2007-09-11 19:29:59 UTC
Downgrading to P3 as discussed in i-team
Comment 7 Samaresh Panda 2008-03-29 02:41:20 UTC
There are two bottlenecks. getRoot() and getPathFromRoot().

This fix is for getRoot() and will bring the numbers down to half.
http://hg.netbeans.org/main?cmd=changeset;node=42d49de611e2.

The second fix is tricky. I'll try but looks very risky for 6.1. If I can't, will fix it post 6.1.
Comment 8 Samaresh Panda 2008-11-17 16:52:23 UTC
I was trying this with 6.5RC2 and it seemed like the perf is ten times better than it was before. However, it is not
instantaneous. Perhaps I could do some caching of the repetitive completion items. But the caching will only help if the
user has used CC elsewhere in the doc.

Comment 9 Martin Balin 2016-07-07 09:56:58 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss