Commit Graph

4 Commits

Author SHA1 Message Date
Nikolai Kosjar
88e7af8a21 UnitTests: Disable related tests if suspend-patch is missing
Change-Id: Ifdccf2e5842aff13528e52caa4dfd3288214d723
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-09-07 08:59:40 +00:00
Nikolai Kosjar
f07bc467a3 Clang: Tests: Improve DocumentSuspenderResumer
* Use IsEmpty()
* Set up proper error printer

Change-Id: I9d4750f8e69e0660ece33015d439c796077d1727
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-08-24 12:52:10 +00:00
Nikolai Kosjar
024cfda06c Clang: Ensure that an unparsed translation unit is not suspended
Currently this might happen when registerTranslationUnitsForEditor is
called with visible documents that are not the ones that are registered.

Change-Id: I9ae5f75c8bbff6a11161a3387633726066001062
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-08-23 14:54:45 +00:00
Nikolai Kosjar
2d27c55310 Clang: Suspend least recently used translation units
...to free some memory.

The translation units of the 7 most recently used documents ("hot
documents", tracked by document visibility) are kept in memory.
Translation units of other documents are suspended and will be resumed
once they become visible again.

The resumption of a translation unit needs the same time as reparse
(since it is a reparse effectively).

The number of hot documents can be modified by the run time environment
variable QTC_CLANG_HOT_DOCUMENTS=N. Visible documents are always hot.

Task-number: QTCREATORBUG-11640
Change-Id: I68ecd2b1373e303372300203e42d90f65a4b39b3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-08-03 08:27:32 +00:00