iced-rs/iced

Startup performance on Windows

Offen

#615 geöffnet am 14.11.2020

 (11 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)Rust (1.572 Forks)batch import
help wantedperformancequestionrenderingshell

Repository-Metriken

Stars
 (30.491 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 24T 11h) (11 gemergte PRs in 30 T)

Beschreibung

The startup performance of the counter example on Windows is slow. I tested this with the 0.1.1 release and with master and they both seem to have the same problem. In 0.1.1 the example creates a window and then hangs for 2-3 seconds with a spinning cursor before showing anything. On master the same example appears to hide the window for 1-2 seconds, then appears fully rendered. The latter feels more responsive, but it still feels pretty slow. I compared to the druid counter example and found it started basically instantly.

I profiled these in Visual Studio and found that the root cause is the Vulkan instance creation, which takes about 60 percent of the startup time for me, roughly 500-600 ms.

I tested with wgpu's DX11 backend and had similar results, though the majority of time was spent compiling shaders rather than creating an instance. I couldn't get the DX12 backend to even run, so I couldn't profile it.

Contributor Guide