3 ms·
Nope, it’s fine, and maybe even faster actually. The slowest part is drawing the waveform and the (potentially thousands of) red silent areas on a <canvas>, and
by dceddia 4y ago
Nope, it’s fine, and maybe even faster actually. The slowest part is drawing the waveform and the (potentially thousands of) red silent areas on a <canvas>, and the Tauri app does better than the Swift app did there. The 2D canvas is GPU-accelerated so it’s pretty snappy even without doing a bunch of optimizing with dirty rectangles etc, whereas the Swift NSView isn’t hardware accelerated so it required a lot more hand optimizing and I think it’s still not ideal.
The big thing is to avoid blocking the UI thread, so if you’re calling into a Rust function that could take more than a couple milliseconds, marking that Rust function (aka Tauri command) as async will run it in a background thread and the UI won’t hiccup.
- nu11ptr 4y agoThanks for the feedback - this is helpful