Bug 152805 - [performance] BP2701 is loading the WSDL document from disk again
Summary: [performance] BP2701 is loading the WSDL document from disk again
Status: CLOSED FIXED
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.wsi (show other bugs)
Version: 1.5   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 1.5.1 M151   Edit
Assignee: Jeffrey Liu CLA
QA Contact: David Lauzon CLA
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2006-08-03 19:08 EDT by Jeffrey Liu CLA
Modified: 2006-09-21 14:19 EDT (History)
0 users

See Also:


Attachments
Patch for wst.wsi (3.65 KB, patch)
2006-08-16 15:25 EDT, Jeffrey Liu CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Liu CLA 2006-08-03 19:08:15 EDT
Build: WTP 1.5.1 0803

BP2701 is loading the WSDL document from disk again.

XMLUtils.parseXMLDocumentURL(URL, String) line: 208	
WSDLValidatorImpl(XMLDocumentCacheUser).parseXMLDocumentURL(String, String, String) line: 99	
WSDLValidatorImpl(XMLDocumentCacheUser).parseXMLDocumentURL(String, String) line: 69	
WSDLValidatorImpl.getSchemaUsed(Definition) line: 1502	
BP2701.validate(TestAssertion, EntryContext) line: 75	
WSDLValidatorImpl(BaseValidatorImpl).processAssertions(String, EntryContext) line: 315	
WSDLValidatorImpl.processDefinitionAssertions(String, CandidateInfo) line: 581	
WSDLValidatorImpl.validate() line: 173	

We should avoid reloading from disk as much as possible. In a large workspace (1000+ WSDL files), this assertion is taking 9 secs (5% of total time).

Proposed solution:

We can cache the DOM Element represenation of the WSDL document in org.eclipse.wst.wsi.internal.core.wsdl.WSDLDocument, and make it available thru a getter method. By doing so, BP2701 can retrieve this DOM Element later to validate the namespace of the WSDL definition.
Comment 1 Jeffrey Liu CLA 2006-08-16 12:37:18 EDT
Changing priority to P2 because we want to fix this in 1.5.1
Comment 2 Jeffrey Liu CLA 2006-08-16 15:25:42 EDT
Created attachment 48050 [details]
Patch for wst.wsi
Comment 3 Jeffrey Liu CLA 2006-08-16 15:26:52 EDT
Patch reviewed by David Lauzon.
Comment 4 Jeffrey Liu CLA 2006-08-16 15:27:12 EDT
Fixed.
Comment 5 Jeffrey Liu CLA 2006-09-21 14:19:03 EDT
verified and close.