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

Optimize writing with Mono Publisher #22800

Closed
smaldini opened this issue Apr 15, 2019 · 0 comments
Closed

Optimize writing with Mono Publisher #22800

smaldini opened this issue Apr 15, 2019 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@smaldini
Copy link
Contributor

smaldini commented Apr 15, 2019

AbstractServerResponse is currently masking the response body type information with the custom write barrier from ChannelSendOperator. In fact if the body is a Mono, we shouldn't require the barrier at all.

If we preserve the Mono information, the reactor netty response adapter can then preserve it too and call the underlying reactor-netty send(Publisher) with a Mono which should provide room for further optimization at that level.

Same thing on the client request side, where ReactorClientRequest#writeWith can be optimized to preserve the mono too.

Suggestions are implemented in :
https://github.com/spring-projects/spring-framework/tree/optimize-mono-bodies

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 15, 2019
@rstoyanchev rstoyanchev self-assigned this Apr 15, 2019
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 15, 2019
@rstoyanchev rstoyanchev added this to the 5.1.7 milestone Apr 15, 2019
@rstoyanchev rstoyanchev changed the title Optimize Mono Bodies Optimize writing with Mono Publisher Apr 16, 2019
rstoyanchev added a commit that referenced this issue Apr 17, 2019
Not only do we need to preserve Mono in writeWith in the base class
but also in ReactorServerHttpResponse where buffers are mapped.

See gh-22800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants