Skip to content

Cache on expression level #570

@lorenzwalthert

Description

@lorenzwalthert

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions