Open privatenumber opened 11 months ago
Not sure if anything was done but noticing an improvement:
We are always trying to improve the performance over time. I don't think we did something specifically on this one. The 2s you saw on your initial example is very slow though. Not sure what went on there.
It is true that after webcontainer.boot()
is called, there might still be some things starting up.
We're currently actively working at improving startup times and what not. So I hope we can share some news on that soon.
Description of Bug
Provide a concise description of your bug and your project link (if applicable). https://stackblitz.com/edit/stackblitz-webcontainer-api-starter-j1y8jn?file=main.js
When I call
mkdir
right after WebContainer boot, it takes about ~3,700ms to make a directory. The secondmkdir
takes 1ms.I think this is happening because the WC is busy during startup. If it is, I'd like to be able to wait on that, either by including it in
boot()
or a separate Promise, so I can display a loading state.Steps to Reproduce
https://stackblitz.com/edit/stackblitz-webcontainer-api-starter-j1y8jn?file=main.js
Expected Behavior
mkdir
to be fastScreenshots/Screencast
Additional Context/Questions In my app, it looks like
mkdir project; cd project; npm install xyz
is slow because it takes extra long when executing it immediately on startup but you can tell it's not running yet because there's no stdout. I have a separate loading state for WC booting and I'd like for that to be more accurate.