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

Introduce an option to disable metadata handler regeneration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core

    Description

      According to our investigation, Calcite can produce large performance overhead due to meta data handler regeneration.

      To illustrate, suppose we want to get the average size of a rel node, by calling the RelMetadataQuery#getAverageRowSize method. If the rel node type has not been registered before, JaninoRelMetadataProvider#revise method will be called, which will regerenate and recompile the code for the metadata handler.

      This process is time-consuming, as compiling code by Janino is time-consuming: It takes more than 10ms to compile a single source file, even if the file is small. According to our investigation, performance overhead due to this problem can be over 10% of the total optimization time.

      Therefore, we introduce an option to disable metadata handler regeneration. This forces the client to register all rel node types before calling the metadata service, so as to avoid performance being stolen silently.

      For some scenarios, the client mistakenly believes they have registered all rel node types, and this option helps them find the types they have missed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fan_li_ya Liya Fan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 40m
                  3h 40m