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

Allow pluggable buffer recycling via new RecyclerPool extension point #1089

Closed
cowtowncoder opened this issue Aug 26, 2023 · 3 comments · Fixed by #1064
Closed

Allow pluggable buffer recycling via new RecyclerPool extension point #1089

cowtowncoder opened this issue Aug 26, 2023 · 3 comments · Fixed by #1064
Labels
2.16 Issue planned (at earliest) for 2.16 performance Issue related to performance problems or enhancements

Comments

@cowtowncoder
Copy link
Member

cowtowncoder commented Aug 26, 2023

Although the current hard-coder ThreadLocal-based buffer recycling (via BufferRecycler containers accessed via BufferRecyclers) has worked reasonably well up until recently, changes to later JVMs have made ThreadLocal access less beneficial; and in near future (Project Loom et al) even counter-productive.
But there are other ways to allow beneficial buffer recycling: especially for use cases where pooling is integrated with other frameworks.

To allow new default and alternative recycling schemes, let's add RecyclerPool extension point, make current implementation work with it.
And for bonus points, possibly implement one or more alternate implementations to use.

@cowtowncoder cowtowncoder added performance Issue related to performance problems or enhancements 2.16 Issue planned (at earliest) for 2.16 labels Aug 26, 2023
@cowtowncoder
Copy link
Member Author

Note: #1064 is the current PR for implementation

@cowtowncoder
Copy link
Member Author

cowtowncoder commented Sep 30, 2023

Created issues for follow-up work for 4 modules:

  • Avro and Smile format modules
  • JAX-RS / Jakarta-RS providers

planning to at least tackle first 2 for 2.16, but ideally all 4.

@cowtowncoder
Copy link
Member Author

Ok, realized that JAX-RS / Jakarta RS use case is NOT for Object recycling, so not related to this work -- closed issues.

Smile format use case removed altogether as FasterXML/jackson-dataformats-binary#403 (performance benefit seemed too modest to be worth it).

This leaves just Avro to be converted, hopefully by 2.16.0.

@cowtowncoder cowtowncoder changed the title Allow pluggable buffer recycling via new BufferRecyclerPool extension point Allow pluggable buffer recycling via new RecyclerPool extension point Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.16 Issue planned (at earliest) for 2.16 performance Issue related to performance problems or enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant