Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328179

Summary: UseScanParser ignores result of visit methods
Product: [Eclipse Project] PDE Reporter: Curtis Windatt <curtis.windatt.public>
Component: API ToolsAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ankur_sharma, darin.eclipse, Michael_Rennie
Version: 3.7Keywords: performance
Target Milestone: 3.7 M4Flags: Michael_Rennie: review+
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 322571    
Attachments:
Description Flags
Fix to avoid calling endvisit methods
none
Fix to respect visit method results none

Description Curtis Windatt CLA 2010-10-19 16:56:26 EDT
Created attachment 181228 [details]
Fix to avoid calling endvisit methods

The UseScanParser does a depth first search through a use scan xml folder and calls a UseScanVisitor to perform actions on it.  Several of the visit methods (component, referencing component, member) allow boolean return values to specify whether children should be visited.

If false is returned, no visit methods of the children should be called.  This works.

If false is returned, no end visit methods of the children should be called.  This fails currently.  I have a fix attached for this.

If false is returned, the children should be skipped entirely.  this fails currently.  We parse every file fully even if we don't need to.  Fixing this would improve performance for visitors that only care about certain components.
Comment 1 Curtis Windatt CLA 2010-10-19 16:58:08 EDT
Assigning to myself for now.  The patch is critical to making my visitor for bug 322571 work, but the performance issues are not major.  The performance may be more important for Ankur's work on IDE integration.
Comment 2 Curtis Windatt CLA 2010-10-25 15:21:48 EDT
The critical fix was applied as part of bug 322571.  We should still pursue the second part of this report as the performance gains will be significant for large use scans.
Comment 3 Curtis Windatt CLA 2010-11-18 11:02:25 EST
Created attachment 183393 [details]
Fix to respect visit method results
Comment 4 Curtis Windatt CLA 2010-11-19 11:31:03 EST
Applied the fix to HEAD.
Comment 5 Curtis Windatt CLA 2010-11-19 14:46:11 EST
Mike, please verify.
Comment 6 Michael Rennie CLA 2010-11-22 14:58:48 EST
looks good