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

fix: speed up just dogfood execution #140

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

StevenLove
Copy link
Contributor

Shortly after installation, I ran just dogfood in order to gauge the speed of Harper on my machine . It seemed slow, each file taking almost a second to lint.

The call to cargo run --release adds a decent amount of overhead to each file in the loop, so instead we can use cargo build --release once before the loop to ensure the binary is built, and then run the binary directly within the loop. After this change, each file lints in ~200ms instead of ~1s

Shortly after installation, I ran `just dogfood` in order to gauge the speed of Harper on my machine . It seemed slow, each file taking almost a second to lint. 

The call to `cargo run --release` adds a decent amount of overhead to each file in the loop, so instead we can use `cargo build --release` once before the loop to ensure the binary is built, and then run the binary directly within the loop. After this change, each file lints in ~200ms instead of ~1s
@elijah-potter
Copy link
Owner

Looks good to me. I do want to make it clear that harper-cli is not representative of the practical speed of Harper when it's used in harper-ls or Obsidian.

@elijah-potter elijah-potter merged commit 74ee82a into elijah-potter:master Sep 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants