You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Long build times - possibly because build images are not platform-specific #1339
Describe the bug
Build times are quite long using the vm build strategy. Building a small AssemblyScript wrapper can take 5-6 minutes. I am also unable to build Rust wrappers using vm and local strategies, but I don't know if the issues are related.
Please provide the steps to reproduce and if possible a minimal demo of the problem.
Build a wrapper on a machine with an arm processor (e.g. Apple processors)
Expected behavior
I expect build times to be much faster for VM strategy
Screenshots / logs
It may be related to this message: WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
I built the Hello World wrappers in the demos repo multiple times to compare build times. I cleared the docker cache (containers, images, and volumes) and deleted .polywrap folders before each build.
@krisbitney when building using the vm strategy, it uses a pre-built docker image as the "vm" and runs a build script within it. This means that, in order for build times to be quick, you need to have the vm image downloaded first. If you are "clearing docker cache before each build" then you are removing the >1GB base image from your system, which requires a new download to take place when you run build again.
Can you please try building a wrapper multiple times w/o clearing the docker cache? The build times should be very quick (close to native).
@krisbitney when building using the vm strategy, it uses a pre-built docker image as the "vm" and runs a build script within it. This means that, in order for build times to be quick, you need to have the vm image downloaded first. If you are "clearing docker cache before each build" then you are removing the >1GB base image from your system, which requires a new download to take place when you run build again.
Can you please try building a wrapper multiple times w/o clearing the docker cache? The build times should be very quick (close to native).
The VM strategy build time improves on the second and third build, but it's still much slower for me
AS Hello World build using VM strategy
First build: Done in 297.63s
Second build: Done in 121.05s
Third build: Done in 121.63s
AS Hello World build using Image strategy
First build: Done in 12.25s
Second build: Done in 11.04s
Third build: Done in 9.07s
AS Hello World build using Local strategy
First build: Done in 16.40s
Second build: Done in 14.35s
Third build: Done in 13.59s
Rust Hello World build using Image strategy
First build: Done in 35.34s
Second build: Done in 36.11s
Third build: Done in 33.00s
Activity
dOrgJelli commentedon Oct 17, 2022
@krisbitney when building using the
vmstrategy, it uses a pre-built docker image as the "vm" and runs a build script within it. This means that, in order for build times to be quick, you need to have the vm image downloaded first. If you are "clearing docker cache before each build" then you are removing the >1GB base image from your system, which requires a new download to take place when you run build again.Can you please try building a wrapper multiple times w/o clearing the docker cache? The build times should be very quick (close to native).
krisbitney commentedon Oct 17, 2022
The VM strategy build time improves on the second and third build, but it's still much slower for me
AS Hello World build using VM strategy
First build:
Done in 297.63sSecond build:
Done in 121.05sThird build:
Done in 121.63sAS Hello World build using Image strategy
First build:
Done in 12.25sSecond build:
Done in 11.04sThird build:
Done in 9.07sAS Hello World build using Local strategy
First build:
Done in 16.40sSecond build:
Done in 14.35sThird build:
Done in 13.59sRust Hello World build using Image strategy
First build:
Done in 35.34sSecond build:
Done in 36.11sThird build:
Done in 33.00s