Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
App slow startup
Trian last edited by
Hi and welcome to devnet,
What do you have in that big file ? Do you need everything from it ?
Trian last edited by Trian
Thank you, SGaist. In the big file, there are just a handful of functions. There is a giant function containing 5,000 line of codes ( don't ask me why since I have just given this project), and for startup, this is a real bottleneck function. This function is being called once upon startup. To verify, I comment out the caller, so that this method won't get invoked, and there is no improvement in startup time. Now if I literally remove the body of this giant method and return null, startup time is reduced to just 18 seconds. I want to refactor this function and move it to c++ side; unfortunately, this function is quite complicate. Thus, refactor would be time consuming. So now. I am looking for suggestions.
Schluchti last edited by
Do you need that function really at start up? I am not sure if that works, but you could try to put the import statement in a own QML component that gets loaded asynchronously in a Loader.