When iterating on {{PropertyMetadata}} and {{TypeMetadata}} to build Lucene Documents, we're implicitly creating keyset iterators as these are represented by using {{HashSet}} s . The amount of memory being "burned" is quite high.
Also we should definitely avoid invoking the ReflectionHelper methods at runtime: {code} propertyAccessor.getName(){code} Allocates various intermediate Strings and even applies some pattern matching magic on it.
|