-
Notifications
You must be signed in to change notification settings - Fork 207
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
Synchronize the access to LRUCache #978
base: main
Are you sure you want to change the base?
Conversation
ramele1907
commented
Dec 18, 2024
- a wizard that is creating multiple cdt projects encounters ConcurrentModificationException
Hi @ramele1907 - thanks for the PR. Unfortunately the code as provided doesn't compile. See build ouput for more details.
Because # of reads far outweigh number of writes and you indicated that multiple projects are being created simultaneously, did you consider concurrency instead of synchronizing all accesses to the map? Those caches were added in 9e7b5be to dramatically speed up the code, and I think that adding synchronized around each read access may have an unintentional slowdown. If you can demonstrate that It would help if there is a way to reproduce the problem so that we can see the problem in action. |
@ramele1907 Would you like to have a look at this and see if you can resolve the compile errors and other comments I made in my preliminary review #978 (comment) |
- a wizard that is creating multiple cdt projects encounters ConcurrentModificationException
229d077
to
7d47221
Compare
@jonahgraham I resolved the compile errors. I will try to use concurrency instead of synchronization to avoid performance issues. Regarding the reproduction topic I will try to create a mock plugin with a wizard that creates multiple projects. |
Great - I will set the build off running. On your next update please update to the latest HEAD of the main branch.
I'm pleased you found concurrency easy enough to do. Did you calculate the performance issue? Was it significant?
Wonderful! I recently did something similar by creating an example CMake project wizard that isn't shipped to customers, but demonstrates how to make custom wizards. See https://github.com/eclipse-cdt/cdt/blob/main/NewAndNoteworthy/CDT-12.0.md#cmake-support-easier-for-extenders-and-isvs |
Also did you see this comment from my original review #978 (comment)?
I am relying on you to verify that my statement is true (that the inner maps need addressing) |