Use fewer thread locals for MutationGuard #13857
Labels
a:performance-improvement
Performance improvement potential
@configuration-cache
in:core-utilities
base services
We now use one
ThreadLocal
perDefaultMutationGuard
instance. This caused a memory leak-like slowdown. We fixed the slowdown by removing theThreadLocal
when possible in #13428.A better solution would be to have fewer
ThreadLocal
s in the first place, e.g. by only having oneThreadLocal
which retains a map of all the mutation guards.cc: @gradle/execution
The text was updated successfully, but these errors were encountered: