Skip to content

WebClient's first request is slow [SPR-17200] #21734

@spring-projects-issues

Description

@spring-projects-issues

Krzysztof Slonka opened SPR-17200 and commented

I discovered an issue with first request and shared state in WebClient. In short, the first request takes a lot of time to complete (~300 ms on my machine) compared to the following requests (~5 ms).  The performance compared to RestTemplate is a bit problematic in case of integration tests with WireMock. I described more details in a repository with code examples: https://github.com/slonka/webclient-debug

 

I'd be grateful for some insights whether this can be improved via configuration or changes to WebClient source code that would initialize static fields eagerly before first request.

 

Please let me know if I can provide any more information.


Affects: 5.0.8

Reference URL: https://github.com/slonka/webclient-debug

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions