-
Notifications
You must be signed in to change notification settings - Fork 21.8k
ActionView Erubis rendering is ten times slower than plain Erubis #17565
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
Comments
Hi @brauliobo! Thanks for taking your time to report an issue 😄. However, I can't seem to understand what the issue is about.
Could you also provide more information about the benchmarks that you've made? For instance, I can't be sure what |
These numbers are very small for a benchmark, could you maybe increase the iteration count by a factor of a lot? That would be awesome :) |
@rud here they are
|
@tgxworld The purpose of this issue is to find out what is the overhead of views, rendering helpers and its context (controller) on template rendering. I think it might help to improve rails performance. Fast erubis is just one the engines erubis provides, please look at their website. More information can be easily found on https://github.com/brauliobo/slim/blob/master/benchmarks/run-benchmarks.rb |
@brauliobo thanks for bringing our attention to this. I tried to investigate, here are my 2 issues with the benchmarks you're running: Firstly, Fixing the bench to run Secondly, @brauliobo maybe you should profile the bench, to see where the time is being spent? |
@thedarkone you're completely right, rails erubis was just pure erubis. commited the fix and here are the corrected benchmarks:
|
@thedarkone now we have two slow downs: rails erubis (~3x) and actionview (~3x). i'm still learning about profiling tools, and I'll certainly profile more deeply this code to find the reasons. but maybe on rails erubis the reason is probably the different buffer used? |
@thedarkone I tried to use |
This issue has been automatically marked as stale because it has not been commented on for at least The resources of the Rails team are limited, and so we are asking for your help. If you can still reproduce this error on the Thank you for all your contributions. |
This issue has been automatically marked as stale because it has not been commented on for at least The resources of the Rails team are limited, and so we are asking for your help. If you can still reproduce this error on the Thank you for all your contributions. |
Erubis has been replaced with Erubi as of 7da8d76, so I think we can close this issue. |
Hello all,
I wanted to know what is the overhead of ActionView and modified slim's benchmarks. See the results below.
To reproduce checkout https://github.com/brauliobo/slim and run
TASK=bench bundle exec rake bench iterations=1000
The text was updated successfully, but these errors were encountered: