Skip to content

Mem and Performance Improvements - #28

Merged
jshep23 merged 7 commits into
mainfrom
EfficiencyTestingAndImprovements
May 2, 2026
Merged

jshep23 merged 7 commits into
mainfrom
EfficiencyTestingAndImprovements

Conversation

@jshep23

@jshep23 jshep23 commented May 2, 2026

Copy link
Copy Markdown
Contributor

After sleeping for more than 4 hours I realized there were some major memory and performance improvement opportunities to be had, but would be breaking changes. Now's the time to do it before 3.0.0 goes out.

  • where on CurrentPropertyList no longer eagerly allocates memory by forcing the results of the query into a List<>. Now returns an Iterable and is up to the caller to decide when to take that hit (if they need to at all).
  • Bulk actions on lists such as clear, addAll, etc, will no longer always emit the previous list contents on the event stream. This could potentially be a huge improvement for large lists as the previous implementation always made a copy of the entire list and added it to the change event (who would do such a thing...). You can still opt-in if you were relying on the previous value, but now it's up to you to shoot your own foot and we won't shoot it for you.
  • Optimized a change on a map or list where many items were altered in a single pass. Previously would send a ton of events, one for every item that changed (on huge lists this would be very costly), now will send a single change event.

@jshep23
jshep23 merged commit fbb07c4 into main May 2, 2026
5 checks passed
@jshep23
jshep23 deleted the EfficiencyTestingAndImprovements branch May 2, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant