Skip to content

Avoid multiple volatile reads/writes in a row where only one is enough#25899

Merged
jhoeller merged 1 commit intospring-projects:masterfrom
stsypanov:volat
Nov 5, 2020
Merged

Avoid multiple volatile reads/writes in a row where only one is enough#25899
jhoeller merged 1 commit intospring-projects:masterfrom
stsypanov:volat

Conversation

@stsypanov
Copy link
Contributor

  • in MethodInvocationProceedingJoinPoint use the same approach as in InjectionPoint.getAnnotations() to do only one volatile read for all calls after field initialization instead of two.
  • in AutowiredAnnotationBeanPostProcessor we are guareded by synchronized
  • AbstractCacheManager newly created LinkedHashSet always has some extra capacity, so calculation of it's size +1 is redundant

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 12, 2020
@jhoeller jhoeller self-assigned this Nov 5, 2020
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 5, 2020
@jhoeller jhoeller added this to the 5.3.1 milestone Nov 5, 2020
@jhoeller jhoeller merged commit e1f51b4 into spring-projects:master Nov 5, 2020
@stsypanov stsypanov deleted the volat branch November 10, 2020 14:25
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) type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants