Changes between Version 8 and Version 9 of GenshiFaq
- Timestamp:
- Jul 10, 2006, 7:48:52 PM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenshiFaq
v8 v9 38 38 == What are the main differences between Kid and Markup? == 39 39 40 Markup executes templates directly, there's no code generation phase. Expressions are evaluated in a more forgiving way by walking the AST. Template variables are stored on a stack, which means that some variable set in a loop deep in the template won't leak into the rest of the template. And even though Markup doesn't generate Python code for templates, it generally performsslightly better than Kid (even up to 2x in [source:/trunk/examples/basic/ some of our tests], but the exact differences depend on a lot of factors).40 Markup executes templates directly, there's no code generation phase. Expressions are evaluated in a more forgiving way by walking the AST. Template variables are stored on a stack, which means that some variable set in a loop deep in the template won't leak into the rest of the template. And even though Markup doesn't generate Python code for templates, it generally [wiki:MarkupPerformance performs] slightly better than Kid (even up to 2x in [source:/trunk/examples/basic/ some of our tests], but the exact differences depend on a lot of factors). 41 41 42 42 Markup does not depend on !ElementTree. It uses Expat for parsing XML, and is based on streaming slightly abstracted parse events through the processing pipeline. It uses XInclude – instead of Kids' `py:extends` – to allow template authors to factor out common bits. For match templates, it uses XPath expressions instead of the !ElementTree API.