Skip to content

Conversation

charlesbr1
Copy link
Contributor

All the inserted fields are duplicated : they are converted to StringField, then added to the treeMap.
We can remove a lot of allocations by avoiding this behavior. Unless there is a specific reason for this purpose, it seems to works fine without this.

The setField(DoubleField field) method got a different implementation from the other because we do not want to allocate a Double instance if the field was built using a double. Hence no null field check are performed for this one.

Furthermore, the setGroupCount() method allocated the string "1" when there is only one group, this is not efficient.

A cache for frequently used string of integers
All the inserted fields are duplicated : they are converted to StringField, then added to the treeMap.
We can remove a lot of allocations by avoiding this behavior. Unless there is a specific reason for this purpose, it seems to works fine without this.
Furthermore, the setGroupCount() method allocated the string "1" when there is only one group, this is not efficient.
Fixed a regression (ClassCastException) with components
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.

1 participant