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 168232 - Caching unresolved references (Excessively long BPEL validation with HL7 project)
Summary: Caching unresolved references (Excessively long BPEL validation with HL7 proj...
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: Nikita Krjukov
URL:
Keywords:
Depends on: 168376
Blocks:
  Show dependency tree
 
Reported: 2009-07-07 14:45 UTC by Nikita Krjukov
Modified: 2009-10-12 15:23 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test project (118.89 KB, application/octet-stream)
2009-07-07 15:00 UTC, Nikita Krjukov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Krjukov 2009-07-07 14:45:02 UTC
A new performance problem was found with BPEL validation if project contains HL7 schema. 
It is related to the issue #158236. The problem is caused by the same reason. 
The special schema models cache was applied to escape repeated resolving of schema models by schema models' references
(import, include, redefine). But the cache isn't populated if the reference failed to resolve. So the broken references
are tried resolving repeatedly anyway. The BPEL validation takes unacceptably long time, If the BPEL project contains an
xml schema file with many broken references. The problem can be tested with the attached project. 

The XPath validation was illuminated from BPEL Validation set in order to partly fix the problem (see issue #168169)

The suggested solution is to cache broken references as well (in order to prevent repeated attempts of resolving). The
cached state should be discarded sometimes to give the broken link a new attempt to be resolved. It's suggested to add a
new method to schema model to discard broken references from the cache. The method will be called explicitly over all
schema models in a BPEL project before validating a BPEL file or compiling the BPEL project. A BPEL module has to be
responsible over collecting a set of relevant schema models and discarding broken references.
Comment 1 Sergey Lunegov 2009-07-07 14:48:37 UTC
Nikita, I thought it should be filed against xml modules.
Comment 2 Nikita Krjukov 2009-07-07 15:00:02 UTC
Created attachment 84448 [details]
Test project
Comment 3 Nikita Krjukov 2009-07-28 11:32:28 UTC
Partly fixed. See here http://hg.netbeans.org/main/rev/5fcf431b83bc

The unresolved references are cached for 5 seconds now. I haven't provided any support to discard this cache yet. 
Now it seems the 5 seconds delay looks as sufficient solution.  
Comment 4 Quality Engineering 2009-07-29 05:58:47 UTC
Integrated into 'main-golden', will be available in build *200907290201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5fcf431b83bc
User: supernikita@netbeans.org
Log: #168232 - Excessively long BPEL validation with HL7 project
Comment 5 Nikita Krjukov 2009-08-01 15:14:50 UTC
Reopen to correct a comment
Comment 6 Nikita Krjukov 2009-08-03 23:09:03 UTC
Comment fixed http://hg.netbeans.org/main/rev/cf1578dec742
Comment 7 Quality Engineering 2009-08-04 17:48:55 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/cf1578dec742
User: supernikita@netbeans.org
Log: #168232 - Excessively long  BPEL validaton with HL7 project
Comment 8 Nikita Krjukov 2009-08-05 19:09:38 UTC
Verified with JUnit tests + verifying different BPEL projects
Comment 9 pgebauer 2009-10-06 11:58:38 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/8fcc60d6e36a
http://hg.netbeans.org/release67_fixes/rev/cabab66dde60
Comment 10 Sergey Lunegov 2009-10-12 15:23:19 UTC
Verified by Michael Nazarov.