New libclang API: clang_suspendTranslationUnit to reduce memory footprint
kfunk at kde.org
Wed Jun 7 06:43:59 UTC 2017
Just as a personal note and for future reference: There's new libclang API we
can potentially use to save some memory, introduced by our friends from
Worth having a look at it once we find the time.
This is the commit message of the patch I'm referring to:
Author: Erik Verbruggen <erikjv at me.com>
Date: Tue May 30 14:25:54 2017 +0000
[libclang] Allow to suspend a translation unit.
A suspended translation unit uses significantly less memory but on the
other side does not support any other calls than
clang_reparseTranslationUnit to resume it or
clang_disposeTranslationUnit to dispose it completely.
This helps IDEs to reduce the memory footprint. The data that is freed
by a call to clang_suspendTranslationUnit will be re-generated on the
next (re)parse anyway. Used with a preamble, this allows pretty fast
resumption of the translation unit for further use (compared to disposal
of the translation unit and a parse from scratch).
Patch by Nikolai Kosjar!
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 163 bytes
Desc: This is a digitally signed message part.
More information about the KDevelop-devel