Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6466

Add benchmark for SQL parser instantiation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.38.0
    • None

    Description

      Summary:
      Sql Parsers instantiation is slow because it instantiates a Throwable with a stacktrace.
      The speed of instantiation also depends on the call stack depth at the time of instantiation. The deeper in the call stack, the slower the instantiation.

      Analysis:
      This is an issue caused by JavaCC. The issue is fixed in newer version of JavaCC.
      Once JavaCC is upgraded to 7.0.13 (https://issues.apache.org/jira/browse/CALCITE-5541), this benchmark can be re-run.
      See full discussion here:
      https://lists.apache.org/thread/xw35sdy1w1k8lvn1q1lr7xb93bkj0lpq

      TODO:
      Add a benchmark to measure the evolution of this issue.
      The benchmark can be re-run once https://issues.apache.org/jira/browse/CALCITE-5541 is done.

      Expected improvements are:

      • a minor speed improvement of ~10% for all parsers impacted by the issue
      • the instantiation of parsers should not depend on the call stack depth anymore

      Attachments

        Issue Links

          Activity

            People

              cyrilou242 Cyril de Catheu
              cyrilou242 Cyril de Catheu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: