slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.93k stars 566 forks source link

Initial Window Draw Latency #1150

Closed sciguyryan closed 1 year ago

sciguyryan commented 2 years ago

Hi there.

I'm exploring using Slint as a GUI framework for a project I'm working on. I've been looking through the examples and have added the basic "hello world" example into my project.

I've noticed that there is maybe half a second of latency after the window opens before the coloured text is drawn to the window.

Is there any reason for this, and is there any way to avoid this happening? I'm concerned that it could end up quite significant with a more complex GUI.

Thanks in advance,

Ryan.

tronical commented 2 years ago

Hi! Which operating system and windowing system are you using?

ogoffart commented 2 years ago

Also make sure you are building in release mode as debug mode can be slow (but still shouldn't take half a second)

sciguyryan commented 2 years ago

Hi! Which operating system and windowing system are you using?

I'm using Windows, specifically Windows 10 at present.

tronical commented 2 years ago

This might be the same cause as #418, i.e. winit's event handling on Windows. If you look for a workaround on Windows, you could try with Qt: https://github.com/slint-ui/slint/blob/master/docs/install_qt.md

tronical commented 2 years ago

Hi @sciguyryan, I think that with commit this may be fixed. That's in the latest release. Could you try again and see if this still happens for you?

ogoffart commented 1 year ago

Please re-open or comment if this is still an issue