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

Reduce impact of default multiplexing setup on the ReferenceIndex

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.3, 1.8.0
    • Component/s: core, property-index
    • Labels:
      None

      Description

      The default Multiplexing setup (no default mounts) has some impact on computing the default strategy used on the query side, as seen in some perf tests:

      "Reverse Call Tree","Time (ms)","Level"
      "java.lang.Object.hashCode() Object.java (native)","160914","1"
      "java.util.HashMap.hash(Object) HashMap.java:362","","2"
      "java.util.HashMap.put(Object, Object) HashMap.java:492","","3"
      "java.util.HashSet.add(Object) HashSet.java:217","","4"
      "java.util.Collections.addAll(Collection, Object[]) Collections.java:3845","","5"
      "com.google.common.collect.Sets.newHashSet(Object[]) Sets.java:183","","6"
      "org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStrategies(boolean, MountInfoProvider, Iterable, String) Multiplexers.java:101","","7"
      "org.apache.jackrabbit.oak.plugins.index.property.Multiplexers.getStrategies(boolean, MountInfoProvider, NodeState, String) Multiplexers.java:69","","8"
      "org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndex.getStrategies(NodeState, MountInfoProvider, String) ReferenceIndex.java:160","","9"
      "org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndex.lookup(NodeState, String, String, String, Filter) ReferenceIndex.java:135","","10"
      "org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndex.query(Filter, NodeState) ReferenceIndex.java:121","","11"
      "org.apache.jackrabbit.oak.query.ast.SelectorImpl.execute(NodeState) SelectorImpl.java:323","","12"
      

      the reasoning being the current code builds a HashSet of one item. This can be greatly optimized by using ImmutableSet.of(element).

        Attachments

          Activity

            People

            • Assignee:
              stillalex Alex Deparvu
              Reporter:
              stillalex Alex Deparvu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: