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

Open
mre opened this issue Oct 17, 2019 · 2 comments

Comments

@mre
Copy link
Owner

@mre 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?

@CephalonRho

This comment has been minimized.

Copy link
Contributor

@CephalonRho CephalonRho 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

This comment has been minimized.

Copy link
Owner Author

@mre 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.