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

Summary: Caching unresolved references (Excessively long BPEL validation with HL7 project)
Product: xml Reporter: Nikita Krjukov <supernikita>
Component: Schema ModelAssignee: Nikita Krjukov <supernikita>
Status: VERIFIED FIXED    
Severity: blocker CC: slunegov, sustaining, yaroslavskiy
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 168376    
Bug Blocks:    
Attachments: Test project

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.