Closed richardstartin closed 2 years ago
Richard, great finds. If you don't mind asking me, what profiling tool are you using?
Richard, great finds. If you don't mind asking me, what profiling tool are you using?
I'm using JFR, visualised with JMC
This profile was taken from an Apache Pinot controller:
About 18% of the samples were in
ClusterStatusMonitor.setPerInstanceResourceStatus
(zoomed in)The root causes are:
PerInstanceResourceMonitor$BeanName
ClusterStatusMonitor.setPerInstanceResourceStatus
becausecontainsKey
is called beforeget
, when the same effect could be achieved efficiently bycomputeIfAbsent