Significant performance difference between partials / components when nesting #936
Unanswered
thewatts
asked this question in
Show and tell
Replies: 1 comment
-
Are those benchmarks from Rails "development" mode with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just wanted to emphasize what we've found while looking into VC.
Performance is talked about in the benchmarks, and we've seen a significant difference in speed when it comes to rendering nesting partials/components.
Our use case: we were attempting to build "components", but using partials to do so, with helpers to call them.
Ex:
etc.
We started seeing pretty poor performance as soon as we had to output collections to render a partial, that renders a partial, that renders a partial, etc. To the point where we had to start pulling those partials into methods directly, using tag helpers.
In just basic testing, we've seen that
ViewComponent
really scales well when working with nested views/components.These are screenshots when rendering (10k items for emphasis):
Partials
Components
Here's an issue we have on Rails/Rails going through it, for full context.
Thanks for all your hard work on this project, it's super exciting!
Beta Was this translation helpful? Give feedback.
All reactions