Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-1486

Minimize allocation cost of iterating on metadata fields

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.0.CR1, 5.0.0.Alpha1
    • Component/s: None
    • Labels:

      Description

      When iterating on PropertyMetadata and TypeMetadata to build Lucene Documents, we're implicitly creating keyset iterators as these are represented by using HashSet. The amount of memory being "burned" is quite high.

      Also we should definitely avoid invoking the ReflectionHelper methods at runtime:

      propertyAccessor.getName()

      Allocates various intermediate Strings and even applies some pattern matching magic on it.

        Attachments

          Activity

            People

            • Assignee:
              sanne Sanne Grinovero
              Reporter:
              sanne Sanne Grinovero
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: