Skip to content

Commit 5203b75

Browse files
fix: Fix incorrect suggestion in log message (#458)
I missed a factor of 2 since previously, the flag controlled the size for a single buffer, but now it controls the size for a single worker (and there are 2 buffers per worker)
1 parent 50bb043 commit 5203b75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

indexer/JsonIpcQueue.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,13 @@ JsonIpcQueue::sendValue(const llvm::json::Value &jsonValue) {
7979
buffer.substr(0, 25),
8080
buffer.substr(buffer.size() - 25, 25));
8181
if (buffer.size() < 10 * 1024 * 1024) {
82+
// Multiply by 1.5 for breathing room.
83+
// Multiply by 2 because there are 2 buffers for each worker, and
84+
// --ipc-size-hint-bytes controls the space per worker, so the buffer
85+
// size must be half of whatever was provided by --ipc-size-hint-bytes.
8286
spdlog::info(
8387
"try passing --ipc-size-hint-bytes {} when invoking scip-clang",
84-
size_t(double(buffer.size()) * 1.5));
88+
size_t(double(buffer.size()) * 1.5 * 2));
8589
}
8690
}
8791
return ex;

0 commit comments

Comments
 (0)