Bug 358482 - LRU cache of TU's for files opened in editor
Summary: LRU cache of TU's for files opened in editor
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (other bugs)
Version First Reported In: git master
Platform: Other Linux
: VHI normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-24 14:01 UTC by Milian Wolff
Modified: 2024-07-09 18:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milian Wolff 2016-01-24 14:01:47 UTC
Currently we keep the TU's in memory for all files that are opened in an editor. This can lead to high memory consumption. We should instead implement a manual LRU cache of N translation units.

Reproducible: Always
Comment 1 Aleix Pol 2016-06-14 13:28:16 UTC
Is that really a release blocker? This bug report needs quite some love otherwise.
Comment 2 Milian Wolff 2016-06-14 14:09:31 UTC
OK, lets remove the tag. I do think it should be implemented though.

Currently, we put the clang data into the IAstPtr. That one only gets cleared once the file is not opened in the editor anymore. That means, if you have a hundred files open in KDevelop, you'll keep a hundred clang TUs in memory, which has a significant impact.

Instead, we should not store the data in the IAstPtr but instead have our own kdev-clang specific thread-safe LRU that caches the last N clang TUs.