Commit Graph

6 Commits

Author SHA1 Message Date
Ben Langmuir
f24f798ac4 Speed up compilation database loading when using "command"
The JSON compilation database allows specifying arguments either as an
array of string ("arguments") or as a single shell-escaped string
("command"). When using "command", we were hitting very slow load times
for large compilation databases. This commit speeds up splitting the
shell-escaped command by not iterating the UTF-8 view instead of the
graphemes.

In release builds I see ~10x speedup of the splitting perf test, and
~3-5x in a debug build. In a real-world test using the cmake-generated
compile_commands.json for llvm+clang this sped up overall compilation
database loading from 11 seconds to 1.2 seconds on my machine.
2020-02-03 12:31:34 -08:00
Ben Langmuir
b917ebe5d9 Infer index store path from compilation database
Find the index store path by searching through the command-line
arguments, and if found, also provide a default database path next to
the index store. Also add command-line arguments so that either of these
can be overridden. We could also easily add these as initialization
options if an LSP client wanted to provide them in the future.
2020-02-03 09:07:01 -08:00
Ben Langmuir
e1fa70d086 Update SPM -> TSC module name prefixes 2019-09-03 08:29:19 -07:00
Ben Langmuir
b92abf4140 Remove testable imports of SKCore 2019-08-08 21:33:02 -07:00
Ben Langmuir
87914fcd1e [compdb] Log only once per query on failure 2018-12-03 21:50:00 -08:00
Ben Langmuir
aabf57a252 Import SourceKit-LSP sources 2018-11-13 15:50:48 -08:00