Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345150 - Improve Resource.isFiltered() performance
Summary: Improve Resource.isFiltered() performance
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Serge Beauchamp CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2011-05-09 10:52 EDT by Serge Beauchamp CLA
Modified: 2011-05-10 06:47 EDT (History)
1 user (show)

See Also:
Szymon.Brandys: review+


Attachments
Fix (2.16 KB, patch)
2011-05-09 10:54 EDT, Serge Beauchamp CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Beauchamp CLA 2011-05-09 10:52:34 EDT
The implementation of Resource.isFiltered() is sub-optimal, because it iterates through all the parents of a resource to see if the resource is filtered out of a workspace, even if there's no resource filters in the project.
Comment 1 Serge Beauchamp CLA 2011-05-09 10:54:12 EDT
Created attachment 195079 [details]
Fix

The optimization consists of verifying ahead of the iteration if the project lacks resource filters, then returning false right away.
Comment 2 Serge Beauchamp CLA 2011-05-09 11:30:10 EDT
Can you review the patch for me please?  Thanks.
Comment 3 Szymon Brandys CLA 2011-05-10 05:36:52 EDT
Looks good.
Comment 4 Serge Beauchamp CLA 2011-05-10 06:47:32 EDT
This is now fixed on cvs head.