Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
(Java) V4 4.5.0
-
None
Description
The implementation of SingletonPrimitiveType#getName() is expensive if monitored in the JVisualVM sampler:
@Override public String getName() { return getClass().getSimpleName().substring(3); }
The main problem here is the Class#getSimpleName is a quite "complex" calculation that's exectued every time when the method is invoked. The name should be cached instead.