-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Performance of language tree rendering #1350
Comments
Rendering a page tree of 8000 pages nested 10 levels deep takes ~11 seconds to load and serialize on my Late 2016 MBP (Core i5, 3.1GHz). Another 5-6 seconds is rendering time (parsing the JSON and painting it with Handlebars). I tried to speed up the serialization with What we can do to make it faster is to optimize the actual painting/parsing in the browser. Most likely by using a faster DOM parsing library like VueJS. This is a larger task, though. I encountered a problem with Turbolinks caching requesting the page tree twice if navigating with Turbolinks. I fixed this in #1463 |
Hi @tvdeyen! Thanks for looking for at Panko, I am the author I ran the same benchmark as you did and found something interesting that might help you here. On my computer (MacBook Pro (15-inch, 2017), 2.9 GHz Intel Core i7) I ran the seed with the same amount of pages you did. The request takes 9 seconds which 90% of the time is in serializing, a profiling reveals that -
see https://gist.github.com/yosiat/190868de7ad2a8211fa3a4c7aade6098#file-flame-svg If I can help somehow with Panko, Sorry, didn't noticed it's old issue |
This issue has not seen any activity in a long time. If the issue descriped still exists in recent versions of Alchemy, please open a new issue or preferably open a PR with a fix. Thanks for reporting. |
If you have multiple thousands of pages in a language tree, loading of such takes about 20seconds on an average server.
These numbers are taken from an example where I rendered a fully unfolded page tree of ~7000 pages. ActiveRecord is pretty fast while the view rendering is way too slow to call it acceptable.
@pascalj already improved a lot with this PR ac564d7 but its supposed to speed up the loading time when branches are folded.
For now we monkey patched the behaviour for us to have:
1.) Pages folded by default when a User is created.
2.) Enabled folding in sorting mode.
I think the implementation of the Page folding mechanism is discussable as a general matter. Enabling folding in sorting mode actually feels right and works pretty well.
The text was updated successfully, but these errors were encountered: