Skip to content

Improving CLI boot times #277

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

Closed
kddnewton opened this issue Feb 5, 2023 · 1 comment
Closed

Improving CLI boot times #277

kddnewton opened this issue Feb 5, 2023 · 1 comment
Labels

Comments

@kddnewton
Copy link
Member

There is a fair amount of code in Syntax Tree that doesn't get executed unless you're treating it like a library. This includes everything under the lib/yarv directory, the parser translation, and a lot of the visitors.

We should be more judicious with when we load code. Because of the dual nature of this project (CLI and library) the CLI suffers worse boot times for every line of code added to the library that doesn't immediately impact formatting.

A combination of autoloading and/or nesting requires more deeply into the files that need them should do the trick, but profiling and experimenting will be required. The benchmark we should be improving is

$ stree format -e 0

That should be as fast as we can make it.

@kddnewton
Copy link
Member Author

Updated now with a lot of autoloading.

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

No branches or pull requests

1 participant