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

4.0 backports #1470

Merged
merged 2 commits into from
Sep 14, 2018
Merged

4.0 backports #1470

merged 2 commits into from
Sep 14, 2018

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Sep 10, 2018

What is this pull request for?

Backports sitemap rendering speed fixes into 4.0

Notable changes

Backports

pascalj and others added 2 commits September 10, 2018 18:06
Previously the page tree was rendered in full even if pages are folded.
Consider the following tree: even if level 1 was folded, level 2 and 3
would get rendered and sent to the client.

- root
 |+ level 1
   |- level 2
     |- level 3

This change does two things:

1. load all user-folded pages for the current user in advance, reducing
the number of queries to 1
2. skips all pages that are under a folded page

The result is:

- root
 |+ level 1

Together with 5a4c0d3 this speeds up the page tree rendering from 20
seconds to ~100ms when only 10 folded pages are shown
(Alchemy::Page.count == 4000).
With Turbolinks caching enabled the sitemap renders twice. With large sitemaps this is already slow, doubling the request time is not nice :)
@creativej
Copy link

Oh yes thank you! =]

@tvdeyen tvdeyen merged commit d3141ef into AlchemyCMS:4.0-stable Sep 14, 2018
@tvdeyen tvdeyen deleted the 4.0-backports branch September 14, 2018 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants