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 169515 - It's necessary to indexing root components of a schema model in some cases
Summary: It's necessary to indexing root components of a schema model in some cases
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Model (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-30 00:23 UTC by Nikita Krjukov
Modified: 2009-10-12 15:22 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 Nikita Krjukov 2009-07-30 00:23:54 UTC
It's very frequent operation - look for a component inside of an XML schema. 
Now it is implemented with a simple cycle. It works well with small amount of components. 
But in case of big amount it becomes a problem. 

The problem has been found with HL7 schema where there > 1000 components on the root level. 

It seems the most realistic that a schema can have huge amount of components only at the root level. 
So it is suggested applying optimization to the root level only. 

The idea of optimization is to build the TreeMap index of root components with the component's name as a key. 
It can be required to build and rebuild the index time after time. But it looks reasonable anyway because 
the share of write requests is going to remain much smaller then read requests. 

The index approach has to be used automatically based on a threshold amount of root components.
Comment 1 Nikita Krjukov 2009-08-03 23:05:54 UTC
Fixed in trunk
http://hg.netbeans.org/main/rev/4429f6d2e45c
http://hg.netbeans.org/main/rev/892ae1c0fd6a

The last change set corrects mistake I did because of another issue #169510
The fix contains new code and related JUnit tests
Comment 2 Quality Engineering 2009-08-04 17:49:27 UTC
Integrated into 'main-golden', will be available in build *200908041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4429f6d2e45c
User: supernikita@netbeans.org
Log: #169515 - It's necessaryto indexing root components of a shchema model in some cases
Comment 3 Nikita Krjukov 2009-08-05 19:09:11 UTC
Verified with JUnit tests + verifying different BPEL projects
Comment 4 pgebauer 2009-10-06 11:58:34 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/ee24b8b76c9f
http://hg.netbeans.org/release67_fixes/rev/01c325352970
Comment 5 Sergey Lunegov 2009-10-12 15:22:03 UTC
Verified by Michael Nazarov.