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 220670 - Make index to find substitution groups
Summary: Make index to find substitution groups
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Model (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: PERFORMANCE
Depends on: 213435
Blocks:
  Show dependency tree
 
Reported: 2012-10-23 12:22 UTC by everflux
Modified: 2012-10-23 12:39 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter: 193952


Attachments
nps snapshot (42.58 KB, application/nps)
2012-10-23 12:22 UTC, everflux
Details

Note You need to log in before you can comment on or make changes to this bug.
Description everflux 2012-10-23 12:22:14 UTC
This issue was reported manually by sdedic.
It already has 4 duplicates 


Build: NetBeans IDE Dev (Build 201210180002)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b10
OS: Linux
Maximum slowness yet reported was 5835 ms, average is 3565
Comment 1 everflux 2012-10-23 12:22:20 UTC
Created attachment 126396 [details]
nps snapshot
Comment 2 Svata Dedic 2012-10-23 12:26:54 UTC
All schemas are currently load by XML CC to find all substitution groups for elements, which fit into the current context.

We should not load all models, attempt to load the model which controls the context element itself plus, if the element is a member of a substitution group, load the schemas of the substitution candidate(s).

The schema completion support should maintain some index to support this. Without an index, all schemas must be consulted, since the substitutionGroup relation is one-way and is not indicated in the subst group head defining schema.
However this will not decrease time for the 1st completion, which must download the schemas.

Substitutions could consult the index from suggestion (1), which improves completion item collection performance. In the current implementation, ALL schemas are searched for every offered item for 
potential substitions, which means that ALL schema models in the closure are instantiated.