🚀 Template performance: How to write performant Liquid code
Template authors generally do not control how templates are rendered. They only have limited building blocks to work with and how templates render and communicate is set in a certain fixed framework.
That being said, the key element where template authors do have control over, and that actually has by far the largest impact on template performance, is dependencies.
To maintain strong performance across templates and workflows, it is crucial to minimise dependencies across templates and periods, and to only include those that are absolutely necessary.
☀️☀️☀️
The new page lists some tips&tricks to help you manage dependencies.
☀️☀️☀️
Moreover, we’ve also dedicated a more low level section with some small tips to improve specific pieces in the Liquid code, e.g.:
- Avoiding unnecessary iterations in loops
- Accessing correct drops
- Reducing code repetition
Let us know what you think—and enjoy the rest of your summer! 😎