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

Summary: Make index to find substitution groups
Product: xml Reporter: everflux <everflux>
Component: Schema ModelAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: lolo_101
Priority: P2 Keywords: PERFORMANCE
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter: 193952
Bug Depends on: 213435    
Bug Blocks:    
Attachments: nps snapshot

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.