Differences

This shows you the differences between two versions of the page.

performance [2013/05/24 08:58]
127.0.0.1 external edit
performance [2024/05/31 06:48] (current)
104.194.134.81 1
Line 20: Line 20:
**Note:** don't do this unless you absolutely need to. Disabling stat gives only tiny performance improvements, but without it PHP and PHPTAL won't notice when files are updated. **Note:** don't do this unless you absolutely need to. Disabling stat gives only tiny performance improvements, but without it PHP and PHPTAL won't notice when files are updated.
 +
===== Faster TAL ===== ===== Faster TAL =====
Line 25: Line 26:
In templates expressions that have multiple path components (''foo/bar/baz'') require some extra run-time checks. You can change those expressions to use ''php:'' modifier (e.g. ''php:foo.bar['baz']''), which is a little bit faster. In templates expressions that have multiple path components (''foo/bar/baz'') require some extra run-time checks. You can change those expressions to use ''php:'' modifier (e.g. ''php:foo.bar['baz']''), which is a little bit faster.
-Instead of using same complex expression multiple times, use ''tal:define'' to "cache" its value. Access to ''tal:define''d variables is quick.+Instead of using same complex expression multiple times, use ''tal:define'' to "cache" its value. Access to ''tal:define''d variables is quick.
Use ''phptal:cache'' to cache parts of templates that are very costly to generate. Currently there's no support for integration of ''phptal:cache'' with ''memcached'', but [[cache|it's planned]]. Use ''phptal:cache'' to cache parts of templates that are very costly to generate. Currently there's no support for integration of ''phptal:cache'' with ''memcached'', but [[cache|it's planned]].
 +1