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

Add CharBufferDecoder #29741

Closed

Conversation

markusheiden
Copy link
Contributor

@markusheiden markusheiden commented Dec 25, 2022

This provides the optimization mentioned in a comment in the Jackson2JsonDecoder.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 25, 2022
@rstoyanchev
Copy link
Contributor

Could you link to that comment, please?

@markusheiden
Copy link
Contributor Author

markusheiden commented Jan 3, 2023

// Potentially, the memory consumption of this conversion could be improved by using CharBuffers instead
// of allocating Strings, but that would require refactoring the buffer tokenization code from StringDecoder

@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 24, 2023
@poutsma poutsma self-assigned this Feb 7, 2023
@poutsma poutsma added the type: enhancement A general enhancement label Mar 7, 2023
@poutsma poutsma closed this in 5977131 Sep 19, 2023
poutsma added a commit that referenced this pull request Sep 19, 2023
Created abstract CharSequence decoder, which is extended by
StringDecoder and CharBufferDecoder.

See gh-29741
@poutsma poutsma added this to the 6.1.0-RC1 milestone Sep 19, 2023
@poutsma poutsma removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 19, 2023
@poutsma
Copy link
Contributor

poutsma commented Sep 19, 2023

It took us a while to resolve, but thank you for submitting a PR!

In order to reduce code duplication between StringDecoder and CharBufferDecoder, I created an abstract base class that is extended by both.

@markusheiden markusheiden deleted the charbuffer-decoder branch September 21, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants