Results 1 to 6 of 6

Thread: Suggestions to speed-up the startup of GUI app

  1. #1
    Join Date
    Jan 2008
    Location
    Bengaluru
    Posts
    144
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Question Suggestions to speed-up the startup of GUI app

    Hi,

    The application what we are working contains some 5 to 6 user-defined plugins. Each plugin is little memory intensive and as a result to initialize and to load the plugins and start the application takes around a minute with system config as below,

    RAM: 2 GB
    Processor: Intel core 2 Duo 2.4 GHz

    Please let me know if you have suggestions or good practice to keep in mind to minimize the application startup time?

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Suggestions to speed-up the startup of GUI app

    It depends what you mean by "startup time". Memory initialization, for example, it typically done by a low-level operating system routine that is beyond your ability to control. So in some cases you're stuck unless you upgrade your hardware/OS.

    If you want to give the appearance of responsiveness during initialization, just to let the user know that some sort of progress is being made, toss up a splash screen and/or a progress bar. These will appear very quickly and let the user know that the program launched OK. Users are happiest when they can see something happening.

    Or, you can reexamine your initialization routines and see if they are really required or can be performed more quickly. For example, memory allocation is often faster than memory initialization; if you just need a hunk of memory that'll be filled in later, don't bother setting it all to some value.

    Other than that, you'd have to post your code to see if there are areas that might be improved.

  3. #3
    Join Date
    Jan 2008
    Location
    Bengaluru
    Posts
    144
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: Suggestions to speed-up the startup of GUI app

    Hi,

    Application start-up is when mainwindow gets shown to the user. Yes. Right now i am publishing the splash screen till application gets launched. And I am following the standard guidelines of Qt plugins for initialization and loading. As I mentioned in the earlier posts most of the users use the system of that configuration. I will look into the code and try to see whether the start-up time can be reduced. Thanks for your input.

    Please let me know if you have any ideas to speeden up such that it will be very helpful.

    Thanks,
    Nikhil

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Suggestions to speed-up the startup of GUI app

    Do all of the plug-ins need to be loaded at startup time? Can you delay loading a plug-in until it is actually needed? Alternatively, what if you installed a QTimer and had the timeout slot load a new plugin each time it fired? The main window could appear quickly, then over the next few seconds all of the plug-ins could be loaded. Typically, the user isn't going to be doing anything during those first 5 seconds anyway.

  5. #5
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Thanks
    11
    Thanked 16 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Suggestions to speed-up the startup of GUI app

    Maybe the plugins itself are the problem? You should first detect the real cause whats slowing down you and optimize then.

  6. #6
    Join Date
    Dec 2009
    Posts
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Suggestions to speed-up the startup of GUI app

    Have a very basic do nothing mainwindow constructure which fires off a one shot timer and do more initialising in that slot.
    If that takes a long time have some sort of state machine either working on timers or on events as stages of the startup complete.
    For very long startup use threads

    regards

Similar Threads

  1. How can i select a row at startup
    By kosasker in forum Newbie
    Replies: 3
    Last Post: 1st February 2011, 14:25
  2. QWebView Crashes APP on Startup
    By harleyskater in forum Qt Programming
    Replies: 7
    Last Post: 6th October 2010, 15:51
  3. Qt app in linux startup
    By qtlinuxnewbie in forum Newbie
    Replies: 8
    Last Post: 2nd March 2010, 19:37
  4. QT Creator crashed on startup
    By eloos in forum Qt Tools
    Replies: 13
    Last Post: 20th November 2009, 09:50
  5. QToolBar go away! On startup anyway.
    By bitChanger in forum Qt Programming
    Replies: 1
    Last Post: 10th February 2006, 19:22

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.