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-10608: optimise Config history #17

Merged
merged 4 commits into from
Jun 14, 2017
Merged

DM-10608: optimise Config history #17

merged 4 commits into from
Jun 14, 2017

Commits on Jun 14, 2017

  1. remove use of traceback to save i/o

    traceback.extract_stack formats the traceback, including reading
    the source file. When doing a large Config manipulation, this adds
    a lot of unnecessary i/o (8% of a recent ci_hsc run) since that
    information isn't used except for debugging (and most information
    is immediately tossed anyway in order to get just the caller).
    
    Replaced traceback.extract_stack with a leaner implementation that
    only reads the source file when necessary. Added new interface that
    provides information for just the caller rather than getting the
    full stack trace and then throwing away all but one element.
    PaulPrice committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    49121b3 View commit details
    Browse the repository at this point in the history
  2. callStack: remove re.sub in favor of str operations

    Compiling and executing a regex is unnecessary when all we want to do
    is extract a trailing sub-string. This may save up to 6% of a total
    ci_hsc run.
    PaulPrice committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    487a9cb View commit details
    Browse the repository at this point in the history
  3. makeConfigClass: replace inspect.stack() with leaner version

    We don't need to trace the full stack just to get the module of interest.
    PaulPrice committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    5e948ba View commit details
    Browse the repository at this point in the history
  4. add test for pickling wrapped Control object

    The wrapper for Control objects notes that mucking with the module is
    necessary for pickling. Since I've just changed the part that identifies
    the module, I thought a test that the pickling still works would be a
    good idea.
    PaulPrice committed Jun 14, 2017
    Configuration menu
    Copy the full SHA
    07e5312 View commit details
    Browse the repository at this point in the history