ccls icon indicating copy to clipboard operation
ccls copied to clipboard

Potential performance improvements: simdjson & libfmt

Open sunbubble opened this issue 4 years ago • 3 comments

I just had a showerthought idea regarding two possible performance improvements in ccls.

I didn't do any benchmarking neither know whether these components are the performance bottleneck of ccls. So take this as profoundly speculative. I'm just mentioning it, since I didn't see it in the issues.

  1. replace rapidjson with simdjson.
  2. use libfmt for string formatting and composition (avoid the creation of temporary string instantiations.

I'd love to hear your thoughts about it. Thanks for the wonderful work.

sunbubble avatar May 15 '21 16:05 sunbubble

as far as i know, the bottleneck of ccls is the cache load speed and compile speed, use sqlite to save cache file may get huge improvement in hdd or mac as we read only one file

findNextStep avatar May 17 '21 03:05 findNextStep

cache load speed

Is the cache load speed related to the parsing of the compile_commands.json file?

sunbubble avatar May 18 '21 11:05 sunbubble

cache load speed

Is the cache load speed related to the parsing of the compile_commands.json file?

no i mean the speed to load .ccls-cache direction.

now ccls save symbol into separate file, which will be very slow in hdd and mac, maybe use sqlite will be better

findNextStep avatar May 18 '21 12:05 findNextStep