Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-12784

Avoid building and checking of cfg entries for compiled configs

    • Storage Engines
    • v8.0

      We should see if the API_CONF macro can be faster in some cases, or depend on less. This macro was intended to be used at the beginning of all methods that support compiled configuration. In WT-12298 luke.pearson@mongodb.com discovered that replacing the "normal"

      API_CONF(session, WT_CURSOR, bound, cfg, conf);

      with

        WT_ERR(__wt_conf_compile_api_call(session, WT_CONFIG_REF(session, WT_CURSOR_bound),
            WT_CONFIG_ENTRY_WT_CURSOR_bound, config, &_conf, sizeof(_conf), &conf));
      

      made this function faster. He says:

      I deliberately skipped this (API_CONF) as it depends on calling CURSOR_API_CONF which is about a 20% perf hit. The reason it depends on that is it de-references the cfg array: cfg[1] which is only built if you go through the more expensive API call.
       
      We should see if this approach can/should be applied more generally. Perhaps at minimum, we need an alternate form of API_CONF.

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            donald.anderson@mongodb.com Donald Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: