This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Sketch: interning filenames
Needs ReviewPublic

Authored by sammccall on Feb 1 2021, 2:34 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This is an idea to attack two problems:

  • simplify string tracking, copies, comparisons. Should be worth some perf, maybe reduce complexity in some places.
  • make it easy+efficient to treat paths as case-insensitive where needed (we've been stomping these bugs as they get reported, but there are more...)

Three main limitations I'm running into:

  • It's really painful to try to convert all of clangd to use this at once, but it's hard to measure the performance by converting only part.
  • Conversion back and forth to URIs limits our wins, we're copying+re-interning all the time. For the index, fix is to eliminate URIs, we have ideas for this. URIs on the wire are fine, we can just slap a cache on them.
  • Pulling filenames out of clang APIs (FileManager) limits our wins too.

Diff Detail

Event Timeline

sammccall created this revision.Feb 1 2021, 2:34 PM
sammccall requested review of this revision.Feb 1 2021, 2:34 PM