This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 328179 - UseScanParser ignores result of visit methods
Summary: UseScanParser ignores result of visit methods
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: API Tools (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks: 322571
  Show dependency tree
 
Reported: 2010-10-19 16:56 EDT by Curtis Windatt CLA
Modified: 2010-11-22 14:58 EST (History)
3 users (show)

See Also:
Michael_Rennie: review+


Attachments
Fix to avoid calling endvisit methods (1.69 KB, patch)
2010-10-19 16:56 EDT, Curtis Windatt CLA
no flags Details | Diff
Fix to respect visit method results (5.30 KB, patch)
2010-11-18 11:02 EST, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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