2 ms·
Nice - I have no UI skills so will definitely use an existing lib. I know my limits. :-) Did you notice any diff in UI speed with view being in JS/HTML/CSS? Re
by nu11ptr 4y ago
Nice - I have no UI skills so will definitely use an existing lib. I know my limits. :-)
Did you notice any diff in UI speed with view being in JS/HTML/CSS? Response time seems nice in your video so I'm guessing negligible?
- dceddia 4y agoNope, 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