Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-51130

Qt3D excessive cloning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 5.7
    • Qt3D
    • None
    • Windows 7, MSVC2013 64b.
      Qt3d dev branch

      By design Qt3D clones QNode to have thread safe data access.
      It seems that it ends up cloning a lot. material-cpp calls clone on my 4 core/8 hyper threads machine ~130000 times while constructing the scene.

      I took material-cpp example and modified it (attached) with my own texture implementation to see how many times the texture is created. Single texture ends up getting constructed/copied and destroyed 64 times before anything is displayed on screen.
      The example calls Render::LoadTextureDataJob::run 110 times, there it never manages to find datafunctor for textures so they are not reloads. However the actual texture data is only copied twice which is only one extra (render aspect vs. jobs?).

      My concern is since the clone always clones all the children of a node the number of clones grows rapidly with more complex scenes.

        1. materials-cpp.zip
          24 kB
          Janne Roine
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            e0150566 Janne Roine
            e0150566 Janne Roine
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes