Skip to content

Avoid ASYNC dispatch if possible in DefaultAsyncServerResponse  #32223

Closed
@rstoyanchev

Description

@rstoyanchev

Spring for GraphQL relies on the GraphQL Java AsyncExecutionStrategy as do most other solutions. However, the actual handling in some cases may return immediately without the need for blocking. For such cases, the ASYNC dispatch could be avoided to reduce overhead.

We are going to make a change spring-projects/spring-graphql#904 in Spring for GraphQL to call ServerResponse.async(future) conditionally, only if the future is not done, but this might be more generally useful.

This issue is to explore whether similar conditional logic could be done within the call to ServerResponse.async.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions