Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-45844: Avoid creating identical parsers #1084

Merged
merged 2 commits into from
Sep 25, 2024
Merged

DM-45844: Avoid creating identical parsers #1084

merged 2 commits into from
Sep 25, 2024

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    73650de View commit details
    Browse the repository at this point in the history
  2. Avoid creating identical parsers (DM-45844)

    Building parsers is expensive, now `ParserYacc` keeps a cache of parsers,
    there is one parser created per combination of keyword parameters. In
    reality there will be just one parser because we do not pass any non-default
    parameters to constructor. This makes repeated construction or `ParserYacc`
    significantly faster, timing shows reduction from 6.6 sec to 0.3 msec per
    1000 instantiations.
    
    This commit removes option for identifier substitution at parser level (`idMap`
    parameter for `ParserYacc`). We never used that option, its presence made
    reusable parsers hard to implement. We handle identifiers in our visitor classes,
    so there is no impact on our code. The only use of that option in the unit tests
    was also removed.
    andy-slac committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    71576b8 View commit details
    Browse the repository at this point in the history