-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
Smart caching would be done by top level expressions, i.e. cache every top level expression separately (but process all non-cached top-level expressions as a block since we need to run all styling separately on them otherwise). The current implementation only helps when styling files that are already styled, e.g. it will make style_pkg() considerably faster if most files are already styled previously. It will also make the styler pre-commit hook run faster. However, when changing one line in a big file that was styled previously, the cache for all expressions is invalidated and there is no benefit from caching.
There is stale WIP at https://github.com/lorenzwalthert/styler/tree/caching-top-level-expr.
randy3k