slint icon indicating copy to clipboard operation
slint copied to clipboard

Initial Window Draw Latency

Open sciguyryan opened this issue 2 years ago • 5 comments

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.

sciguyryan avatar Apr 05 '22 19:04 sciguyryan

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

tronical avatar Apr 05 '22 20:04 tronical

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

ogoffart avatar Apr 06 '22 05:04 ogoffart

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

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

sciguyryan avatar Apr 06 '22 07:04 sciguyryan

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 avatar Apr 06 '22 07:04 tronical

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?

tronical avatar Jul 05 '22 12:07 tronical

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

ogoffart avatar Nov 29 '22 11:11 ogoffart