What's Changed
Summary:
- Simplified loader logic, moving cvars logic to templatetags
- Dropped internal requirement for component keys throughout
- Improved component template caching
- Cleaned shared responsibility of slot tag and created new internal tag - 'attr' to handle attribute expressions
- Simplified context handling, now keep all cotton related state in own context object
- Up to 32% faster*
Performance vs old*
These benchmarks were run over 5 iterations with 500 iterations per test case (representing the rare cases you may have ~500 components on the page), comparing Django native vs. Cotton for loops, block and extends, and includes.
For loop
Django average: 2.18 ms
- Cotton before: 4.65 ms
- Cotton after: 3.17 ms