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

Optimize ignore_modules to avoid unneeded stack inspections #39

merged 1 commit into from Apr 4, 2019


None yet
2 participants
Copy link

Rotonen commented Apr 3, 2019

The new stack-inspection-on-read logic of time freezing has proven expensive and has roughly tripled the fixture build time of opengever.core from just over one minute to about three and a half minutes. It also seems to have added about a minute to the runtime of the test server self test run.

I've side stepped this by only inspecting the stack if the user has explicitly passed in an iterable of module names to ignore.

Build of current master of opengever.core ~19 minutes:

Build of current master of opengever.core against this branch ~16 minutes:

Two main culprits for this being so heavy:

  1. inspect.stack() iterates over the .items() of potentially very large dictionaries
  2. inspect.getmodule() hits the disk during module discovery

@Rotonen Rotonen requested a review from jone Apr 3, 2019


jone approved these changes Apr 4, 2019

Copy link

jone left a comment

Oh, didn't realize that 🙈
Thanks for the fix!

@Rotonen Rotonen merged commit c9f444b into master Apr 4, 2019

2 checks passed

CI Governor: test-plone-4.3.x.cfg Task #382604 succeeded
CI Governor: test-plone-5.1.x.cfg Task #382605 succeeded

@Rotonen Rotonen deleted the jo-optimize-freezer-stackinspection branch Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.