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.
Nikita, I thought it should be filed against xml modules.
Created attachment 84448 [details]
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.
Integrated into 'main-golden', will be available in build *200907290201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Log: #168232 - Excessively long BPEL validation with HL7 project
Reopen to correct a comment
Comment fixed http://hg.netbeans.org/main/rev/cf1578dec742
Integrated into 'main-golden', will be available in build *200908041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Log: #168232 - Excessively long BPEL validaton with HL7 project
Verified with JUnit tests + verifying different BPEL projects
The fix has been ported into the release67_fixes repository.
Verified by Michael Nazarov.