Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-1027

Avoid turning multivalued properties to String arrays

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10
    • core

    Description

      Many places especially in the security code use String arrays as an intermediate representation for multivalued name and string properties. Unfortunately this practice leads to quite a bit of extra memory allocation and extra work in performance-critical places like AC evaluation.

      For example, a significant percentage of the time in the SetProperty benchmark goes to PrivilegeUtil.readDefinitions(), just because of the array conversion that requires a number of extra object allocations and at least two extra iterations over the relevant value strings.

      That extra work could be avoided in readDefinitions() and other similar places if the Iterable<String> return type of PropertyState.getValues() was used directly instead of a String array.

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: