Uploaded image for project: 'S2Graph'
  1. S2Graph
  2. S2GRAPH-11

Performance tuning on sort by scoreSum on PostProcess

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Done
    • Major
    • Resolution: Done
    • None
    • None
    • None

    Description

      when query has group by, current implementation first build array of json object with scoreSum. after that sort this array by looking up json path with “scoreSum” key which is unnecessary. worse part is after look up, JsValue need to be casted as double which is very slow. profiling with visualvm shows that this JsValue.as[Double] use 7% of cpu cycle.

      we already know what is scoreSum before sorting and costly operation like JsValue.as[Double] should be avoided for performance tuning.

      this affect query performance a lot since JsValue.as[Double] should be run on every result edges.

      for example, 10k query per second with average result size 100, then 10k x 100 call per second on as[Double] will be called.

      Attachments

        Activity

          People

            steamshon Do Yung Yoon
            steamshon Do Yung Yoon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 72h
                72h
                Remaining:
                Remaining Estimate - 72h
                72h
                Logged:
                Time Spent - Not Specified
                Not Specified