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

Can WeavingURLClassLoader/ExtensibleURLClassLoader be made parallel-capable? #268

Open
euclio opened this issue Dec 14, 2023 · 2 comments
Open
Labels
enhancement New feature or request question Further information is requested

Comments

@euclio
Copy link
Contributor

euclio commented Dec 14, 2023

I'm wondering if this is a possibility, or if the class loading procedure can't be parallelized. For projects with large numbers of classes it could result in a performance boost.

https://docs.oracle.com/javase/8/docs/technotes/guides/lang/cl-mt.html

@kriegaex
Copy link
Contributor

kriegaex commented Dec 14, 2023

I do not have much experience in this field. For now, I have no such plans.

You are wondering if it could boost performance. I.e., you have not tried. How about creating some verifable facts? If you want to take a stab at implementing it, feel free to do so.

  • Create a PR.
  • Make sure not to break any tests (or adjust them to pass again, in case they only fail due to parallel log output that is expected to be serial).
  • Measure performance for some repeatable scenarios (before/after) to have proof of whether and by much it speeds up typical use cases.
  • Add test cases hardening the change for multi-threaded scenarios in danger of breaking if implemented incorrectly. E.g., it might be problematic if classes are loaded in parallel, if weavable target classes are loaded before the corresponding aspects, or if aspect advices are woven before ITDs from the same or another aspect are in place. Methods, fields or implemented interfaces introduced by ITD might be the target of aspects. Probably there are numerous other cases in need to be handled in the correct order.

@kriegaex kriegaex added enhancement New feature or request question Further information is requested labels Dec 14, 2023
@kriegaex
Copy link
Contributor

FYI, lately a PR has been merged that improves weaving in a parallel scenario, see #279.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants