Why is the initialization so slow?
When running the examples, the initialization of wgpu takes at least 500 ms. I'm running the release build of hello_triangle. To measure the time, I used std::time::Instant::now() at the beginning of the run() function, and the time until event_loop.run() starts was at least 500 ms.
Total initialization: 576
Instance: 202
Surface: 0
Adapter: 143
Device and queue: 85
Shader: 0
Render pipeline: 0
Surface configure: 140
Shutdown is also quite slow. I'm running the example on Windows, and the correct backend is selected: GTX 1080 with Vulkan.
Is this normal? It seems very strange, considering that a similar triangle example on pure Vulkan(but C++) starts almost instantly.
It seems very strange, considering that a similar triangle example on pure Vulkan(but C++) starts almost instantly.
Could you provide the numbers for the C++ example?
Using a profiler would give more actionable data to work with.
Using a profiler would give more actionable data to work with.
I was doing this, the reason for the long creation of Instance was the creation of DX12 and Vulkan instances at the same time, I haven't checked the rest yet. Anyway, it doesn't seem like a big problem right now to spend a lot of time on it. Thanks for the reply.