Pyside / OSX (Mavericks) -- Very slow app startup

  • Hi all,

    Well, this seems to be essentially all I ever post about here. When I used to use PyQt for my app, only this code took 8.5 seconds:

    import sys
    from PyQt4 import Qt
    a = Qt.QApplication(sys.argv)

    I switched to PySide and got a big speedup, down to only about 3 seconds.

    However, after upgrading to Mavericks and using homebrew to reinstall PySide and Qt, this code takes 8 seconds!

    import sys
    from PySide.QtCore import *
    from PySide.QtGui import *
    app = QApplication(sys.argv)

    It's always the last line, so I believe there is a delayed import.

    Is there any way to achieve any sort of speedup in application launch? 8 seconds it just too long to wait again and again, and it's especially frustrating when debugging.

    (1, 2, 1, 'final', 0)

  • Lifetime Qt Champion


    One speedup you can try is to avoid calling import *, import only what you use.

    Hope jt helps

  • Unfortunately, this also takes 8 seconds:

    import sys
    from PySide.QtGui import QApplication
    app = QApplication(sys.argv)

    I have no leads on what else to try..

  • Lifetime Qt Champion

    Which version of Qt are you currently using ?

  • print PySide.QtCore.version


    Anything come to mind?

  • Lifetime Qt Champion

    First thing to do move to 4.8.6, it's the first version of the 4 series that officially supporting Mavericks

  • Alright, I'll give it a try. I had quite a bit of trouble trying to install Qt/PySide once I moved to Mavericks. What ultimately worked was running:

    brew install pyside

    and after quite some time it was all built and installed. I guess for some reason that command ended up doing 4.8.5. I only ran it two weeks ago.

    Any suggestions on the best path to getting 4.8.6 installed? I'm a bit new to the installation and building process.

  • Lifetime Qt Champion

    Since you are using brew, then you should look with the brew guys directly.

    Otherwise, you can grab the latest Qt 4 installer from the download page

  • I'd be happy to try installing somehow other than with brew.

    I only resorted to using brew and building rather than just installing binaries because here:

    The Qt link for for OSX links to 4.8.5 (and is broken!)

    Perhaps I don't understand -- is the proper installation path to install Qt 4.8.6, then compile PySide on top of that? Or is there somewhere I can just get binaries for Qt 4.8.6 and PySide 1.2.1?

  • Lifetime Qt Champion

    The link has been update

    You should contact the original author of this wiki entry to see if he can help you directly

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.