-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Out of curiosity - Performance #14
Comments
@jonathan-s That is a great question. I haven't done any benchmarking, but I would expect similar performance metrics as using a normal include. This would be easy to test I think. If you have a template that includes something in a loop, maybe several steps deep, and then at the bottom level, you put an {% include %} and measure performance. Then you replace the bottom level include with a {% component %} call, and compare the loading time. The motivation for this library was not performance, but rather developer ergonomics in working with components. That said, I would happily accept patches that 1) adds a benchmark and 2) improve performance. |
I think we should add a benchmark test in the form of a python script that renders a complex template 1000 times, first with include and then with component, and compares the results. If anyone is able to contribute such a script I'd gladly merge it. |
There is a similar library for rails -> https://viewcomponent.org/ (https://github.com/github/view_component) Apparently that library is 10x faster in rendering than partials, which is the equivalent of django's include.
Do you have any idea what the performance characteristics are for this library?
The text was updated successfully, but these errors were encountered: