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
merged 1 commit into from Apr 4, 2019

Conversation

Projects
None yet
2 participants
@Rotonen
Copy link
Contributor

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:
https://ci.4teamwork.ch/builds/233225

Build of current master of opengever.core against this branch ~16 minutes:
https://ci.4teamwork.ch/builds/233238

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

jone approved these changes Apr 4, 2019

Copy link
Member

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
Details
CI Governor: test-plone-5.1.x.cfg Task #382605 succeeded
Details

@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.