Skip to content

Fix allocations by dropping CategoricalPool type parameter #418

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

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

nalimilan
Copy link
Member

Self-referential types generate allocations since Julia 1.11 (JuliaLang/julia#58169). This third parameter seems to have been unnecessary since NominalValue and OrdinalValue got merged into a single CategoricalValue type.

Fixes #412.

I'm not sure we should backport this or not, given that it's slightly breaking (in particular it breaks deserializing old objects). I don't see a way to fix this without changing type parameters -- the other option is to add one parameter to CategoricalValue.

Self-referential types generate allocations since Julia 1.11 (JuliaLang/julia#58169).
This third parameter seems to have been unnecessary since `NominalValue`
and `OrdinalValue` got merged into a single `CategoricalValue` type.
@nalimilan nalimilan requested a review from bkamins April 28, 2025 20:44
@bkamins
Copy link
Member

bkamins commented Apr 28, 2025

I think this simplification is beneficial in general. We should just warn in the release that the deserialization is not backward compatible.

Copy link
Member

@bkamins bkamins left a comment

Choose a reason for hiding this comment

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

Just maybe add NEWS.jl or something similar so that users are aware of the change.

@nalimilan
Copy link
Member Author

You mean in the 1.0 release or the 0.10.x one?

We don't have NEWS but I'll definitely add release notes when tagging.

@nalimilan
Copy link
Member Author

Merging anyway before #358 so that backporting remains possible without creating a dedicated branch.

@nalimilan nalimilan merged commit f313cb0 into master Apr 29, 2025
14 of 16 checks passed
@nalimilan nalimilan deleted the nl/allocs branch April 29, 2025 09:53
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.

CategoricalValue allocates on julia 1.11
2 participants