Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache on expression level #570

Closed
lorenzwalthert opened this issue Dec 15, 2019 · 0 comments · Fixed by #578
Closed

Cache on expression level #570

lorenzwalthert opened this issue Dec 15, 2019 · 0 comments · Fixed by #578

Comments

@lorenzwalthert
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant