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

Improve compile times #12

Closed
mre opened this issue Oct 17, 2019 · 5 comments
Closed

Improve compile times #12

mre opened this issue Oct 17, 2019 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@mre
Copy link
Member

mre commented Oct 17, 2019

At the moment, it takes ages to generate the Wasm binary.
That's because we download an entire crate and compile it whenever we run tinysearch corpus.json. Maybe anyone has an idea on how to improve that?

@mre mre added enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed labels Oct 17, 2019
@shuni64
Copy link
Contributor

shuni64 commented Oct 18, 2019

Hey, I made a pull request to address this issue. (#13)
The idea is to keep the intermediate build artifacts in $PWD/tinysearch_build instead of leaving them in the temporary download directory, allowing cargo to find them on subsequent builds.
There is still room for improvement as the download could be cached too, but the wasm-pack build time should be almost as good as it gets for a release build now.

@mre
Copy link
Member Author

mre commented Oct 18, 2019

That was fast. Thanks for the fix. The results are quite astonishing (1m17s to 6s).
I'll keep this open for further improvements, but we're off to a great start.

@mre
Copy link
Member Author

mre commented Jan 31, 2020

Two more ideas:

@mre
Copy link
Member Author

mre commented Jun 24, 2020

@mre
Copy link
Member Author

mre commented Aug 19, 2021

After the recent updates compile times should no longer be a big problem. I see around 20-25 seconds on a fresh build.
This is thanks to a reduction in dependencies, less usage of macros, and wasm-pack and Rust compiler improvements. 😊

@mre mre closed this as completed Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants