Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2749

Performance regression 6.6.3.1 -> 6.7.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 6.8.0, 6.7.1, 6.7.2
    • 6.7.0
    • PySide
    • None
    • Linux/X11, macOS, Windows
    • 849394740 (dev), 7df0857cc (6.7), 985d9e01a (dev), 7e9ab958f (6.7), 6aa42b05a (dev), 5ce6e5a00 (6.7), b829abcc7 (dev), 7672c94f2 (6.7), 7782e7dd2 (dev), 6f1700bf5 (6.7.1), fd666faef (6.7.1), d332a3e3a (6.7.1), b8afeda2a (6.7.1), c31d675ce (tqtc/6.7.1)

    Description

      When upgrading from PySide 6.6.3.1 to 6.7.0 (both from PyPi), I get a huge performance regression in my application (https://github.com/SanderVocke/shoopdaloop), making it borderline unusable.

      The application in question has a mix of Python and QML, including using Python objects as registered QML types.

      During application startup and dynamic object creations, a slowdown of about 5x can be seen.

      I am having trouble providing any kind of meaningful information as to where the performance slowdown is coming from. I am hoping you can help me with some suggestions on how to further root cause this.

      What I have tried:

      • QML debugging traces in QtCreator. This shows that basically the entire application start-up is multiple times slower. More or less every object created is slowed down w.r.t. 6.6.3.1 (as opposed to one particular action only costing more time).
      • Sample-based profiling with perf. Comparing the two pyside versions, in 6.7.0 there are large chunks of time going to functions in libshiboken, which are not significantly visible in 6.6.3.1.
        • I don't have debug symbols so I cannot see which function(s) in shiboken are the culprit here.
        • Building pyside6 from source using the setup.py script with --debug did not yield a working PySide in my case. Trying to start with this self-built version gives an infinite recursion error in importlib. I am not sure how to proceed.
      • Tried creating a minimal QML example which instantiates objects with createObject() in a loop and times the result. For these minimal examples, performance was always comparable between the two PySide versions, also when adding some bindings and a Python registered object into the mix.
      • Force all objects I create with incubateObject() to finish immediately using forceCompletion(), to rule out that this somehow comes from the incubator implementation. I see the same performance difference.

      I realize that this is very vague. I am hoping someone has a hint as to how I can investigate this myself to get some more concrete information. Is there a debug version of pyside6 that I can grab from anywhere - or even on a container image? Any pointers on how to get pyside6 built with debug symbols reliably?

      I can provide/upload if of any help:

      • QML debug traces
      • perf data
      • Python wheel of the application in question, which can be run both with v6.7.0 and v6.6.3.1

      Thanks in any case.

      Attachments

        For Gerrit Dashboard: PYSIDE-2749
        # Subject Branch Project Status CR V

        Activity

          People

            ctismer Christian Tismer
            narcoticv Sander Vocke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change