Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15107

Loading large CMake projects is slow when using Ninja generator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 3.5.0
    • None
    • Fedora 22, x86_64

      When using a large CMake project with the Ninja generator, there are long delays when any of the following occurs:

      • The Finish button on the Run CMake window is pressed,
      • The build configuration is switched, or
      • The session is loaded
        The delays are not noticeable when using the Makefile generator instead of Ninja.

      Steps to reproduce:

      1. Decompress attached slow_loading_project.tar.gz
      2. Open the CMakeLists.txt inside it with Qt Creator
      3. On the Run CMake window, select the Ninja generator
      4. Press Run CMake
      5. Press Finish
      6. Try resizing the window or something that should cause the UI to change immediately.

      The attached synthetic project will cause a delay of few seconds during which Qt Creator's UI is unresponsive and its CPU usage is high. I have seen a real world project that causes a delay of about 10 minutes.

      I've attached an interactive SVG flamegraph showing which functions were using the CPU time during the delay.

        1. load_ninja_cmake_project.svg
          144 kB
          James Legg
        2. slow_loading_project.tar.gz
          315 kB
          James Legg
        3. qt-creator-opensource-src-3.5.0-cmake-ninja-fix.patch
          6 kB
          Erol Kutay
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dt Daniel Teske
            jlegg James Legg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes