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

Performance tunning on where parser

    XMLWordPrintableJSON

Details

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

    Description

      Current implementation has critical performance problem on IN parser.

      ex) where: age in(1, 2, 3, 4, 5 ...) / where: _parent.age in (1, 2, 3, 4, 5, …)

      when the query has M edges as result with N elements in IN clause, then IN case class that create N innerVal set and check if this edge`s property value is in this N innerVal set. The most problematic part is building N innerVal set from user query is executed M times(number of result edges, usually hundreds to thousands).

      This create lots of object which create lots of GC and waste lots of cpu resources.

      We can improve this by reducing number of calls to build values to compare on IN.

      building InnerVal set(from above example, it is build 1,2,3,4,5) for value to compare only need to be perform once per each query and never be dependent to number of result edges. only checking against built InnerVal set should be dependent to number of result edges.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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