-
Notifications
You must be signed in to change notification settings - Fork 387
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
Nop build is slow #355
Comments
Here's an example command:
It's the bit between Docker is part of the slowness, but not all:
|
Ok I figured out the magic to show what cargo is doing (set One thing that is slow is this:
Means that for some reason Cargo updates submodules on every build...
Another slow bit is this:
And this:
A non-cross I think those three things account for most of the |
Ok I managed to shave ~1s off the time by using the
Still pretty damn slow. |
Aha! I found a solution to my particular problem. It turns out Cargo outputs a file in I'd recomment using the |
Nice find, I guess in this case
would be preferrable in terms of performance for the container. |
Ah, you're using |
Is some of that network activity? If so Docker by default has some notable overhead with that afaik, even on Linux. You can disregard the safe default and use the host network(something like that, vaguely recall this being the reason docker network performance was slower than the host network directly). |
Note that this actually doesn't have any effect anymore with |
A build of my (quite small) app with no changes using
cross
takes 5 seconds. Usingcargo build
it only takes 0.1 second.It would be nice if a nop
cross
build were as fast as that, so that I can have subsequent steps in my build process depend on it. Currently it makes editing files further down in the build DAG very annoying because you always have to wait 5 seconds forcross
, even if you didn't change anything it consumes.The text was updated successfully, but these errors were encountered: