New libclang API: clang_suspendTranslationUnit to reduce memory footprint
Kevin Funk
kfunk at kde.org
Wed Jun 7 06:43:59 UTC 2017
Heya,
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
TheQtCompany:
https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg58408.html
Worth having a look at it once we find the time.
This is the commit message of the patch I'm referring to:
commit 91321d9884b7ce357cac1d128244d22dbe2a0cc7
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!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304212
91177308-0d34-0410-b5e6-96231b3b80d8
--
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170607/882227bd/attachment.sig>
More information about the KDevelop-devel
mailing list