Skip to content

lsp: Port json reading to RapidJson

Waqar Ahmed requested to merge work/to-rapid-json into master

QJsonDocument is probably the slowest json parser out there. With LSP, in general things are okay if you have a fast enough machine and the server is good e.g., clangd. However, things start getting worse on slower machines and with servers that tend to go "rogue" and start spitting out data at the rate of megabytes per second.

RapidJson seemed like a sensible replacement to me. It is the fastest C++ parser out there with flexible dom style access and is more efficient memory wise.


I have used this successfully for 3 days with multiple servers without any noticeable issues so far.

Merge request reports