[PATCH] D95824: [clangd] Sketch: interning filenames

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 1 14:34:08 PST 2021


sammccall created this revision.
Herald added subscribers: usaxena95, kadircet, jfb, arphaman.
sammccall requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95824

Files:
  clang-tools-extra/clangd/support/Path.cpp
  clang-tools-extra/clangd/support/Path.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95824.320606.patch
Type: text/x-patch
Size: 6493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210201/0b651a06/attachment.bin>


More information about the cfe-commits mailing list