As for the first point, it was more than the calls to TypeHelper.getErasedReferenceType were not cached and we did a lot of them (and the fact that we did that in a loop for the same type did not help either).