Slow startup of Qt app

299 views
Skip to first unread message

Ryang HaeDong

unread,
Jul 10, 2014, 5:32:56 AM7/10/14
to linux...@googlegroups.com

Hi, everyone.

My Qt application is very slow on first startup.
My board is a Allwinner A10 (sun4i linux 3.0.8 + qt everywhere 4.7.1).

When I first try to start my application (with -qws) the screen remains blank for about 4s.

I then briefly get a green background and a mouse pointer before my application starts and hides the mouse.
If I quite my application and start it again, it start instantly (again with brief green screen and mouse pointer).

I tried with Qt static and dynamic, the results do not differ significantly.

I also tried with a simple ‘Hello World’ test and it does the same.

Any ideas why the first start would take so long!

Thanks a lot!

Bastiaan van den Berg

unread,
Jul 10, 2014, 5:40:51 AM7/10/14
to linux-sunxi
Just a guess, did you check if your hostname can be resolved?

Add the hostname to /etc/hosts with ip 127.0.0.1 ..​

This often creates similar delays on many applications, like you described.

--
buZz

Ryang HaeDong

unread,
Jul 10, 2014, 5:55:01 AM7/10/14
to linux...@googlegroups.com
Thanks for your guess.
As you said I did check the /etc/hosts".
"127.0.0.1      localhost"

Bastiaan van den Berg

unread,
Jul 10, 2014, 6:11:28 AM7/10/14
to linux-sunxi
No, i mean the hostname of your installation.
Check whats in /etc/hostname

Put -that- in /etc/hosts with 127.0.0.1 as ip
--
buZz

Rajesh Mallah

unread,
Jul 16, 2014, 7:42:27 AM7/16/14
to linux...@googlegroups.com

Dear Ryang ,
in case you are using lots of qml and images in your application ,
compile them into application using the Qt Resource system
http://qt-project.org/doc/qt-5/resources.html you should see a
marked difference in first time startup times. regds mallah.
Reply all
Reply to author
Forward
0 new messages