Boot time optimization techniques
Srinivasan last edited by Srinivasan
I'm working on a project with QT and Linux on imx6 target. My requirement needs the Linux and application to be up and running in less than 5 seconds. Currently my QT application itself takes around 5 seconds to start and show the initial screen excluding the linux up time.
I have done the following and have questions on the same.
- Loaders - I'm using Loaders to break the QML loading in a sequence so that I get the necessary content loaded in advance. Is there any other alternative to loader?
- Static Linking - Does static linking help in reducing boot time? Currently I'm using all dynamically linked QT libraries which on a whole consumes about 20MB.
- Resources: I have optimized all the images in my project. Does building the resources out of my application help in this? Currently I'm building the application and resources as one single exe.
What more can I do to make the QT application to load faster? Any tips would be helpful.
Cleiton Bueno last edited by
Some things should be done for a Fastboot, for example:
- If you can use Commercial version and qtquickcompiler and static compilation better
- File System on Linux, test according to your hardware and remove support from what you will not use
- Using eMMC for example is "faster" than boot via microSD / SD
- Remove unnecessary resources or used during debugging of the Linux Kernel
- Remove unnecessary resources or used during bootloader development
- It depends on the hardware but test and validate the use of: MTD with UbiFS, use initramFS and some other alternatives
- Boot system there are some, but usually systemd if you get a better job for getting parallelism to start the services
- In the Qt application too, as images to be loaded use asynchronous loading, use "Lazy Load" for the first screen that would be SplashScreen
There is a general job to do, but if you get the boot you want.
Links that may help:
Srinivasan last edited by
@Cleiton-Bueno Thanks for your inputs.
- Currently working on the static compilation with commercial version.
- initramFS is one thing which we have in mind moving forward.
- Other than that, we have already taken care most of your listed points.
And those links really helped. I have gone through them earlier.
Srinivasan last edited by
@JKSH Yes I did.
On QT part, we followed a lot of techniques mentioned in that post. Using Loaders for lazy loading, optimizing images, using qtquickcompiler. The major challenge is on the OS boot time that we are working on.