From 196c996fd2eefd38654cb11242fdbf78914a8af8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 10 Mar 2019 19:50:29 -0700 Subject: [PATCH] Misc --- Customization.md | 14 ++++++++++++++ Debugging.md | 2 ++ 2 files changed, 16 insertions(+) diff --git a/Customization.md b/Customization.md index 93c9acf..317374c 100644 --- a/Customization.md +++ b/Customization.md @@ -122,6 +122,20 @@ When `ccls` indexes `/tmp/host/proj/a.cc`, the cache file (re-indexed), the newly generated `a.cc.blob` will not contain `/tmp/container` paths any more. +#### `cache.retainInMemory` + +Default: 1 + +Change to 0 if you want to save memory, but having multiple ccls processes operating in the same directory may corrupt ccls's in-memory representation of the index. + +After this number of loads, keep a copy of file index in memory (which +increases memory usage). During incremental updates, the removed file +index will be taken from the in-memory copy, instead of the on-disk file. + +Every index action is counted: the initial load, a save action. +0: never retain; 1: retain after initial load; 2: retain after 2 loads +(initial load+first save) + #### `clang.resourceDir` Default: _empty_ diff --git a/Debugging.md b/Debugging.md index 0e9f6b0..72473e6 100644 --- a/Debugging.md +++ b/Debugging.md @@ -6,6 +6,8 @@ First of all, use a [`Debug` build](Build#cmake-options). It is compiled with Enable [logging](Customization#--log-filefile----log-file-appendfile) and [verbose](Customization#-vn) mode when starting the server. +`-log-file=/tmp/ccls.log -v=1` + ### stderr You can find stderr output in: