Skip to content

Skip filter evaluation for projects without resource filters - #2884

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:filter-children-early-out
Open

Skip filter evaluation for projects without resource filters#2884
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:filter-children-early-out

Conversation

@vogella

@vogella vogella commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Resource.filterChildren runs for every directory scanned by a refresh or an isSynchronized walk. Even for a project with no resource filters at all, it allocated two lists and walked the project-relative path to the project root, allocating an IPath and taking a synchronized getFilter call per segment, only to discard everything.

This returns early when the project description holds no filters. ProjectDescription.getFilters() is null exactly in that case, so the check is precise rather than a heuristic, and isFilteredWithException already guards the same way. The gain shows up in the auto-refresh polling path, which walks whole projects continuously on Linux. FilteredResourceTest passes unchanged.

Resource.filterChildren runs for every directory scanned by a refresh or
an isSynchronized walk. Even for a project without any resource filter it
allocated two lists and walked the project-relative path up to the root,
allocating an IPath and taking a synchronized getFilter call per segment.
Return early when the project description holds no filters, which cuts
this garbage from the auto-refresh polling path.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   58m 29s ⏱️ +31s
 4 761 tests ±0   4 739 ✅ ±0   22 💤 ±0  0 ❌ ±0 
12 174 runs  ±0  12 021 ✅ ±0  153 💤 ±0  0 ❌ ±0 

Results for commit d0fb8a3. ± Comparison against base commit 2fa8a80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant