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

Clangbackend uses huge amount of memory - multiple mapped files

    XMLWordPrintable

Details

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

    Description

      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):

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: