-
-
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
Speed improvements for /admin/pages/ #921
Conversation
These changes try to make /admin/pages/ render a lot faster. It works, albeit not nearly fast enough for > 2000 pages.
I've prepared a stage to preview changes. Open stage or view logs. |
👍 I think this is great and it would be great to have this merged (not sure if needs a bit of code style cleanup). I've profiled the production /pages with rack mini profiler and with only about 20-30 pages, the picture is not bells & roses: You're saying that this is still not enough, but where is the holdup? If you've eliminated the partial rendering and the SQL, what's there left, which is slowing it down. You might give the MiniProfiler a try (if you haven't done so already), more specifically the Flamegraphs. |
I've been playing with MiniProfiler and the flamegraphs. The rough conclusion; the next major bottleneck is the Rails router ( While I agree with you maintainability suffers a lot by shifting rendering of this page to the client; usability will be much better. Right now, even with these optimisations, Alchemy is not usable for sites with more than about 500 pages. Depending on your infrastructure of course. Results for 469 pages on an Intel i7-5557U, Linux 4.3.0, Ruby 2.1.5 and Unicorn 5.0.1: |
@@ -1,3 +1,4 @@ | |||
# coding: utf-8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary, since Alchemy is Ruby >= 2 and utf-8 is default encoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was added automatically by Emacs. Feel free to remove it, although in my opinion it's not a bad idea to keep it there. Some editors don't detect file encoding automatically.
Closing in favor of #923 |
These changes try to make /admin/pages/ render a lot faster.
It works, albeit not nearly fast enough for > 2000 pages. It's still useful for smaller sites.
A true solution would be to render the page asynchronously in batches or something.