Metadata about events and fields are stored in annotations, for example Label, and are accessed with getters, such as EventType::getLabel().
The current implementation creates a dynamic proxy to access the annotation with each invocation. This is probably OK since most metadata is only accessed a few times per application.
Two exception might be the getLabel() and getContentType(). An application that prints event values might use the label for each event value and getContentType() to decide formatting. Caching the label speeds up access about 50 times.
The methods getName() and getTypeName(), which are also likely to be accessed frequently, already have dedicated fields. getUnsigned() is also already cached.
The current implementation creates a dynamic proxy to access the annotation with each invocation. This is probably OK since most metadata is only accessed a few times per application.
Two exception might be the getLabel() and getContentType(). An application that prints event values might use the label for each event value and getContentType() to decide formatting. Caching the label speeds up access about 50 times.
The methods getName() and getTypeName(), which are also likely to be accessed frequently, already have dedicated fields. getUnsigned() is also already cached.