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

Making a CL parallel capable has a cost, should we revise our decision for QuarkusClassLoader? #42484

Open
gsmet opened this issue Aug 12, 2024 · 6 comments

Comments

@gsmet
Copy link
Member

gsmet commented Aug 12, 2024

We made QuarkusClassLoader parallel capable and this isn't cost free: the parallelLockMap is more often than not close to 1 MB in memory size.

While I don't have a problem with it if it actually makes things significantly faster, I think we should at least check if it's the case.

See here (sorry the selected line is not the right one but it's easy to find it):

Screenshot from 2024-08-12 14-56-56

@gsmet gsmet changed the title Making a CL parallel capable has a cost, should we revise our decision? Making a CL parallel capable has a cost, should we revise our decision for QuarkusClassLoader? Aug 12, 2024
@geoand
Copy link
Contributor

geoand commented Aug 13, 2024

Another option is to do what we did in RunnerClassLoader which effectively removes the cost of that map.

@quarkus-bot
Copy link

quarkus-bot bot commented Aug 13, 2024

/cc @Sanne (core), @aloubyansky (core), @radcortez (core), @stuartwdouglas (core)

@Sanne
Copy link
Member

Sanne commented Aug 15, 2024

Another option is to do what we did in RunnerClassLoader which effectively removes the cost of that map.

I like that solution, it's a clever locking scheme which removes the need for the map and also makes it more efficient.

I also think it could be improved more even (had some comments on the original PR), but even in its current form it's an improvement over the previous design.

Awesome @gsmet that you're actively watching for such aspects! Love it, we need more of that.

@gsmet
Copy link
Member Author

gsmet commented Aug 15, 2024

Please don't do it right away as there are a few other things going on here: #42525

@geoand
Copy link
Contributor

geoand commented Aug 26, 2024

Yeah, let's leave that for once all the critical stuff is in

@geoand
Copy link
Contributor

geoand commented Sep 2, 2024

With #42525 in, we can no work on this

geoand added a commit to geoand/quarkus that referenced this issue Sep 2, 2024
geoand added a commit to geoand/quarkus that referenced this issue Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants