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

Clangbackend uses huge amount of memory - multiple mapped files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • Qt Creator 4.7.0
    • Qt Creator 4.6.1
    • C/C++/Obj-C++ Support
    • None
    • Linux, clang 5.0.1

      Clangbackend uses a lot of memory. This was already reported and some issues where closed because of an fix / improvement in the memory usage.

      I noticed that the memory usage is related with the amount of opened files by clangbackend. After saving a file in QtCreator multiple times (due to editing), almost all header files remain allocated multiple times and the memory usage increases quickly to several gigabytes. The project itself is relatively small but it uses several libraries / header files.

       

      Files opened by clangbackend at QtCreator startup after waiting for clangbackend to complete its task. Used memory around 0.5G

      Files opened by clangbackend after working some minutes (saving often with Ctrl+S). Used memory 1.5G

      Here the single headers are loaded (mapped) 13 times (over 3 GB):

        1. image-2018-06-01-23-56-12-275.png
          193 kB
          Andrea Denzler
        2. image-2018-06-01-23-57-48-833.png
          177 kB
          Andrea Denzler
        3. image-2018-06-02-01-03-01-492.png
          162 kB
          Andrea Denzler
        4. image-2018-06-04-18-26-57-174.png
          50 kB
          Andrea Denzler
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            andreaplanet Andrea Denzler
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes