Skip to content

Cache intermediate build artifacts#13

Merged
mre merged 1 commit intotinysearch:masterfrom
shuni64:master
Oct 18, 2019
Merged

Cache intermediate build artifacts#13
mre merged 1 commit intotinysearch:masterfrom
shuni64:master

Conversation

@shuni64
Copy link
Contributor

@shuni64 shuni64 commented Oct 18, 2019

With this change the target directory will be moved to $PWD/tinysearch_build by setting $CARGO_TARGET_DIR before calling wasm-pack.
This allows cargo to find the intermediate build artifacts of the previous build instead of discarding them.
On my machine this decreased the build time for fixtures/index.json from 37.58s to 2.62s on subsequent builds.

@shuni64 shuni64 mentioned this pull request Oct 18, 2019
@mre
Copy link
Member

mre commented Oct 18, 2019

That must be one of the most effective single-line changes I saw in a long time. Same result on my machine (1m17s -> 6s). Merged! Thanks @CephalonRho.

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