Skip to content

Conversation

@Matyrobbrt
Copy link
Member

The != notExistingPath doesn't do anything, and the newDirStream method would accumulate the results in a list, which is not efficient for dir streams that early-exit. Streams are meant to be lazy.

@Matyrobbrt Matyrobbrt changed the title Remove the notExistingPath check and use a proper lazy streams Remove the notExistingPath check and use proper lazy streams Nov 16, 2023
@marchermans
Copy link
Member

@cpw This was your code path, and I am trying to understand why it exists. Is there a reason why this uses a custom path?

@Matyrobbrt
Copy link
Member Author

@cpw This was your code path, and I am trying to understand why it exists. Is there a reason why this uses a custom path?

The custom path is left-over code from the initial implementation, when a path filter that wouldn't match will return the notExistingPath. The whole concept has since been abandoned, with non-valid paths simply being skipped. The notExistingPath is safe to remove now.

@Technici4n
Copy link
Contributor

Note: just tested this on ATM9, loads fine as expected.

@Su5eD Su5eD merged commit 420e984 into McModLauncher:main Nov 17, 2023
@Matyrobbrt Matyrobbrt deleted the dirstream branch March 16, 2024 12:18
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.

4 participants