Bug Fixes
Block Inheritance with Nested Blocks (#1)
- Fixed block inheritance to work correctly with blocks defined inside control structures
- Blocks inside
{% if %},{% for %},{% apply %}and other control structures are now properly recognized and can be extended - Added recursive block collection to ensure all blocks are found regardless of nesting level
Template Loading
- Fixed relative path resolution for template loading
- Fixed template fallback mechanism to only execute for not found errors (not for syntax errors)
Performance Improvements
Zero Allocation Optimizations
- Implemented comprehensive zero-allocation rendering path
- Added buffer pooling to reduce memory allocations
- Optimized string handling during tokenization with global string cache
- Improved expression evaluation to reduce allocations
- Added node pooling for commonly used node types
New Performance Features
- Introduced
zero_alloc_tokenizer.gofor high-performance tokenization - Added extensive buffer pool implementation for efficient memory reuse
- Implemented expression pooling to reduce GC pressure
Code Quality Improvements
- Fixed indentation and formatting issues
- Renamed
parser_include.gotoparse_include.go(fixing typo) - Removed redundant optimization benchmark files
- Consolidated optimization implementations
Testing
- Added comprehensive tests for nested block scenarios
- Added relative path resolution tests
- Added benchmarks for buffer pooling and expression evaluation
Breaking Changes
None
Upgrade Notes
This release is fully backward compatible. Users can upgrade without any code changes.
Contributors
Thanks to @simmstein for reporting the block inheritance issue (#1).