[PATCH] D93452: [clangd] Trim memory periodically
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 13 18:21:07 PST 2021
njames93 added a comment.
A little follow up, but I've noticed if I have a lot of tabs open in my editor (usually happens as I forget to close them).
When clangd starts (or restarts) , in the first minute, memory usage will shoot right up as it starts to do its thing.
I've regularly seen it go over 15GB before the first trim call is made and it drops back down and settling at ~2GB. For reference clangd typically reports its usage is ~1.5GB when I'm working on LLVM.
This does result in some noticeable hanging of my system, which while not workstation level, its got more horsepower than a chromebook, no offence to anyone who works at Google :).
Maybe we should trim more aggressively in maybe the first couple of minutes of the process, which is typically when most allocations seem to happen. Then fall back to the once a minute.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93452/new/
https://reviews.llvm.org/D93452
More information about the cfe-commits
mailing list