Skip to content

annotations need to be cached (jvm concurrency issue) [SPR-8737] #13379

@spring-projects-issues

Description

@spring-projects-issues

George Baxter opened SPR-8737 and commented

Java has a concurrency issue when examining annotations on a method or method parameters (synchronized around a jam-wide weak hash map). In high concurrency environments, this becomes a bottleneck. The only current solution is to cache the annotations.

Currently, the MethodParameter class could cache the annotations based on the declaring class, the method and the parameter index. We might have been able to extend MethodParameter class to provide this caching, but unfortunately, the object is instantiated directly within the HandlerMethodInvoker.resolveHandlerArguments(..) (private method).

Currently a critical issue for us.


Affects: 3.0.5, 3.0.6

Issue Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: duplicateA duplicate of another issuetype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions