njames93 added a comment. In D93452#2460563 <https://reviews.llvm.org/D93452#2460563>, @sammccall wrote:
> I think we should pass a nonzero `pad` to malloc_trim of several MB. It only > affects the main thread, but the main thread is constantly allocating small > short-lived objects (e.g. JSON encoding/decoding) and cutting it to the bone > only to have it sbrk again seems pointless. It would require a lot of work, but JSON encoding/decoding is possible without lots of allocations. If you want to really compress memory usage, losing the map like access, O(1), on json objects, in favour of storing them in a vector, O(n), would be beneficial. I don't think the jsons in clangd ever really have maps with large numbers of keys which are queried often. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93452/new/ https://reviews.llvm.org/D93452 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits