Avoid empty array allocations in a few places in AnnotationTypeMapping.
In a heap dump for a production app, there were a couple hundred empty int arrays referenced from AnnotationTypeMapping instances (~3kb of waste); there were also about ~60 empty MirrorSet arrays (~1kb of waste).
Comment From: sdeleuze
@kilink Any chance you could provide a feedback on my question above? If not, I plan to merge your PR without the commented change.
Comment From: kilink
@kilink Any chance you could provide a feedback on my question above? If not, I plan to merge your PR without the commented change.
Sorry, have been somewhat busy and hadn't got a chance to look at it. What you said it probably correct, I was likely just over-aggressive in trying to eliminate possible empty array allocations here. I can push up a change that removes that line.
Comment From: kilink
I double-checked, I only see the problem in AnnotationTypeMapping
(and indirectly TypeMappedAnnotation
):
I went ahead and reverted that line.