Dirk Mahler created OLINGO-1330:
-----------------------------------
Summary: SingletonPrimitiveType#getName() is expensive
Key: OLINGO-1330
URL: https://issues.apache.org/jira/browse/OLINGO-1330
Project: Olingo
Issue Type: Bug
Affects Versions: (Java) V4 4.5.0
Reporter: Dirk Mahler
The implementation of SingletonPrimitiveType#getName() is expensive if
monitored in the JVisualVM sampler:
{code:java}
@Override
public String getName() {
return getClass().getSimpleName().substring(3);
}
{code}
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)