Skip to content

Optimized reading and saving#194

Open
davidmayr wants to merge 10 commits intodevelopfrom
dev/optimized-reading
Open

Optimized reading and saving#194
davidmayr wants to merge 10 commits intodevelopfrom
dev/optimized-reading

Conversation

@davidmayr
Copy link
Copy Markdown
Member

This PR improves the deserialization and serialization to reduce heap allocation.

In extreme cases, up to 80% improvement on memory usage is possible.
Loading performance is roughly the same, saving performance has yet to be tested.

@davidmayr davidmayr requested a review from kyngs April 5, 2026 02:02
@davidmayr davidmayr changed the base branch from main to develop April 5, 2026 02:03
Copy link
Copy Markdown
Member

@kyngs kyngs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Please check my comments, mainly I think the entire CountingOutputStream may be unnecessary? (See the commend in SlimeSerializer for further details)

Comment thread core/src/main/java/com/infernalsuite/asp/util/CountingOutputStream.java Outdated
Comment thread core/src/main/java/com/infernalsuite/asp/util/CountingOutputStream.java Outdated
Comment thread core/src/main/java/com/infernalsuite/asp/util/CountingOutputStream.java Outdated
Comment thread core/src/main/java/com/infernalsuite/asp/serialization/slime/SlimeSerializer.java Outdated
@davidmayr
Copy link
Copy Markdown
Member Author

@kyngs I think I fixed everything

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.

2 participants