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

Cache allowed transitions for analyses on the request #1417

Merged
merged 2 commits into from Aug 9, 2019

Conversation

ramonski
Copy link
Contributor

@ramonski ramonski commented Aug 8, 2019

Description of the issue/feature this PR addresses

This improves the rendering performance of worksheets containing a huge
amount of analyses with dependencies.

Current behavior before PR

The guard guard_retract of worksheets checks for all contained analyses if the "retract" transition is allowed. This code fetches all dependencies of each analysis, which causes the same analyses to be checked multiple times.

Example:

A worksheet containing 434 Analyses with dependencies takes 326.86s to render

Desired behavior after PR is merged

Checked analyses cache their value on the request, so that these analyses are skipped.
In the example above this improves rendering speed by a factor ≈5,65 to 57.86s

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

This improves the rendering performance of worksheets containing a huge
amount of analyses with dependencies.
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ramonski

@xispa xispa merged commit 115cb3c into master Aug 9, 2019
@xispa xispa deleted the analysis-guard-transition-cache branch August 9, 2019 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants