You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: