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

Unnecessary class loading in AspectJ RuntimeTestWalker [SPR-11344] #15968

Closed
spring-projects-issues opened this issue Jan 22, 2014 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jan 22, 2014

Juergen Hoeller opened SPR-11344 and commented

Within our AspectJ RuntimeTestWalker, the InstanceOfResidueTestVisitor resolves types via ClassUtils.forName(type.getName()). This can be become quite excessive and is fundamentally unnecessary, since the underlying AspectJ ReferenceType does hold the Class... It's just a bit buried.

The main problem is that a ClassLoader doesn't efficiently resolve classes that it loaded already. As a consequence, it cannot be treated as an efficient cache for class name -> Class. There is quite some lock contention going on there, at least on WebSphere's ClassLoader.


Affects: 3.2.6, 4.0 GA

Issue Links:

Backported to: 3.2.7

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Fixed through downcasting to AspectJ's ReflectionType and ReflectionBasedReferenceTypeDelegate, obtaining the myClass field there. We only fall back to regular class loading if we encounter any other kind of type.

Juergen

@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.0.1 milestone Jan 11, 2019
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) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants