Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory allocation optimizations #350

Open
wants to merge 3 commits into
base: v-1.4.x
Choose a base branch
from

Conversation

VladRassokhin
Copy link

While processing several memory dumps and allocation reports, I've spotted significant amount of FieldKey, FastField, LinkedList and LinkedList$Itr objects.

It seems most of them are on-time used in some check.
So here are three commits, each one fixes usage of one of the aforementioned classes.

Targeting branch v-1.4.x, as we've using it on our fork, and it could be beneficial to other xstream users. Feel free to cherry-pick to master branch as well.

Speeds up `FieldKey` constructor, hence `FieldDictionary.fieldOrNull`
…places

Avoid generating instances of `FastField` when other already existing objects could be used as map keys.
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.

None yet

1 participant