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

Consider an AST cache #26

Open
Infernio opened this issue Mar 6, 2022 · 0 comments
Open

Consider an AST cache #26

Infernio opened this issue Mar 6, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Infernio
Copy link
Member

Infernio commented Mar 6, 2022

Use pickle (or something else) to serialize the AST and cache it. Then we can skip parsing on repeat commands.

Consider a session like this:

$ zoia build
$ # Build fails, so I fix the errors
$ zoia build
$ # Success! Now to fix my awful formatting
$ zoia fmt
$ zoia check
$ # Uh oh, a bunch of grammar/typo warnings
$ # I fix them, but realize that I repeated one mistake in a few other places
$ zoia grep -i "rust-grown"
$ # Fix those, and:
$ zoia check
$ # All good!

In the process of this session, we parsed the entire project, from scratch, six times. Even though only a handful of files changed at most.

@Infernio Infernio added the enhancement New feature or request label Mar 6, 2022
@Infernio Infernio added this to the v0.2.0 milestone Jun 1, 2022
@Infernio Infernio added this to v0.2.0 Jun 1, 2022
@Infernio Infernio moved this to Todo in v0.2.0 Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant