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

Reuse existing Skia binaries if possible #453

Open
ghost opened this issue Jan 5, 2021 · 3 comments
Open

Reuse existing Skia binaries if possible #453

ghost opened this issue Jan 5, 2021 · 3 comments

Comments

@ghost
Copy link

ghost commented Jan 5, 2021

Currently, it seems that every time the skia-bindings crate is recompiled (for example when compiling after upgrading the Rust toolchain), it redownloads Skia, as sudo iptraf reports traffic when cargo reaches skia-bindings (build).

Normally this is not that much of an issue as wherever it's downloading from serves the files quickly enough, but since yesterday it has become excruiciatingly slow and even corruptions occurred.

As per #10 (comment), the build script can be improved by adding a check if the desired binaries are already downloaded.

@pragmatrix
Copy link
Member

@JackRedstonia You've mentioned that the download happens every time a compiler flag is changed. Can you provide one example that can be used to prove a working fix? I am asking because I assume that the output directory gets changed for even the smallest environment change with the consequence that downloaded archives must be cached somewhere else.

@ghost
Copy link
Author

ghost commented Jan 6, 2021

@pragmatrix Something like this in Cargo.toml of a project that depends on skia-bindings for example:

[profile.release]
lto = "thin"

Commenting/uncommenting this results in a rerun of the build script it seems, which in turn redownloads the binaries, plus some other stuff from codeload.github.com.
I tried cloning the repository and swapping out all the URLs with file://s to local downloads, but it still seems to download something.
(local downloads were obtained through proxies, GitHub always chooses the worst file server to download from for my region, resulting in the build taking forever and then failing on a network error)

@ghost
Copy link
Author

ghost commented Jan 9, 2021

Adding new dependencies to a project also rebuilds.

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

No branches or pull requests

1 participant