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

Plone 5: disable resource registries (performance) #99

Merged
merged 1 commit into from Dec 2, 2019

Conversation

@jone
Copy link
Member

jone commented Dec 2, 2019

In Plone 5, the resource registries are cooked when the resource registry viewlets are rendered. Cooking the bundles takes a lot of time. Since ftw.testbrowser does nothing with JavaScript or CSS, cooking of resources is disabled by default for performance improvement. That means that <script> and <styles> tags are missing in the HTML. This can make the tests up to 4-5 times faster.

ℹ️ This goes into 1.x. I'll forward-port it to master, but I need it in 1.x.

@jone jone changed the base branch from master to 1.x Dec 2, 2019
@jone jone force-pushed the jone-disable-resource-registries branch 3 times, most recently from 0a06c8d to ee6dae2 Dec 2, 2019
docs/source/userdoc.rst Outdated Show resolved Hide resolved
ftw/testbrowser/core.py Outdated Show resolved Hide resolved
@jone jone force-pushed the jone-disable-resource-registries branch from ee6dae2 to 14ee2f8 Dec 2, 2019
@jone jone changed the base branch from 1.x to master Dec 2, 2019
@jone jone force-pushed the jone-disable-resource-registries branch from 14ee2f8 to a8c85fc Dec 2, 2019
In Plone 5, the resource registries are cooked when the resource
registry viewlets are rendered.
Cooking the bundles takes a lot of time.
Since ``ftw.testbrowser`` does nothing with JavaScript or CSS, cooking
of resources is disabled by default for performance improvement.
That means that ``<script>`` and ``<styles>``
tags are missing in the HTML.
This can make the tests up to 4-5 times faster.
@jone jone force-pushed the jone-disable-resource-registries branch from a8c85fc to 4a0d45f Dec 2, 2019
@jone

This comment has been minimized.

Copy link
Member Author

jone commented Dec 2, 2019

👍 merci, updated.
I have switched the base and merge target from 1.x to master because tests do not reliably work on 1.x. It's ok to ship it with 2.0.

@jone jone requested a review from buchi Dec 2, 2019
@buchi
buchi approved these changes Dec 2, 2019
Copy link
Member

buchi left a comment

👍 LGTM

@jone jone merged commit b61c3ad into master Dec 2, 2019
3 checks passed
3 checks passed
CI Governor: test-plone-4.3.x.cfg Task #477430 succeeded
Details
CI Governor: test-plone-5.1.x.cfg Task #477431 succeeded
Details
CI Governor: test-plone-5.2.x.cfg Task #477432 succeeded
Details
@jone jone deleted the jone-disable-resource-registries branch Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.