Skip to content

Refine performance (alt)#1508

Merged
cstamas merged 10 commits intomasterfrom
refine-performance
Jun 25, 2025
Merged

Refine performance (alt)#1508
cstamas merged 10 commits intomasterfrom
refine-performance

Conversation

@cstamas
Copy link
Copy Markdown
Member

@cstamas cstamas commented Jun 25, 2025

Reusing #1492 but simplifying it: copy only the collection that is about to be modified, leave other unchanged (less copy less mem, less cycles).

@cstamas cstamas self-assigned this Jun 25, 2025
@cstamas cstamas mentioned this pull request Jun 25, 2025
8 tasks
@cstamas cstamas marked this pull request as ready for review June 25, 2025 11:53
@cstamas cstamas requested a review from gnodet June 25, 2025 11:54
cstamas added 2 commits June 25, 2025 14:24
* deriveUntil and applyFrom are invariants within same session; do not spend cpu cycles on them
* remove managedLocalPaths as we want javadoc say: first to apply always/consistently
@cstamas cstamas closed this Jun 25, 2025
@cstamas cstamas deleted the refine-performance branch June 25, 2025 12:43
@cstamas cstamas reopened this Jun 25, 2025
@cstamas cstamas merged commit 0c9ada4 into master Jun 25, 2025
17 checks passed
@github-actions github-actions Bot added this to the 2.0.10 milestone Jun 25, 2025
@XenoAmess
Copy link
Copy Markdown

XenoAmess commented Jun 25, 2025

Reusing #1492 but simplifying it: copy only the collection that is about to be modified, leave other unchanged (less copy less mem, less cycles).

Looks good to me, you get the essence.
Though the hashing part of the creation of HashMap might be reduced, by introducing a specialized list structure for value (instead of arraylist) to avoid recalculating hashing, but it might be not worthy to bring the complexity.
The current version in this pr is already good enough for the real world situations IMO.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants