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: Unresolved
    • Not Evaluated
    • None
    • 6.7.0
    • PySide
    • None
    • Linux/X11, macOS, Windows

    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

        1. image-2024-05-10-09-42-05-165.png
          52 kB
          Sander Vocke
        2. image-2024-05-17-00-17-23-933.png
          13 kB
          Sander Vocke
        3. image-2024-05-17-00-18-07-116.png
          12 kB
          Sander Vocke
        4. image-2024-05-17-00-29-09-717.png
          13 kB
          Sander Vocke
        5. shoopdaloop-0.1.0-cp39-abi3-macosx_11_0_x86_64.whl
          5.40 MB
          Sander Vocke
        6. shoopdaloop-0.1.0-cp39-abi3-manylinux_2_31_x86_64.whl
          5.70 MB
          Sander Vocke
        7. shoopdaloop-0.1.0-cp39-abi3-win_amd64.whl
          5.44 MB
          Sander Vocke
        8. pyside2749_log.txt
          1 kB
          Friedemann Kleint
        9. pyside2749_repro.diff
          3 kB
          Friedemann Kleint
        10. shoopdaloop-pyside2749-0.1.0-cp39-abi3-manylinux_2_31_x86_64.whl
          5.73 MB
          Friedemann Kleint
        11. pyside2749_stack.txt
          65 kB
          Friedemann Kleint
        For Gerrit Dashboard: PYSIDE-2749
        # Subject Branch Project Status CR V

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            narcoticv Sander Vocke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews