lean4-htt/src
Marc Huisinga faa4d16dc1
fix: semantic tokens performance (#3932)
While implementing #3925, I noticed that the performance of the
`textDocument/semanticTokens/full` request is *extremely* bad due to a
quadratic implementation. Specifically, on my machine, computing the
full semantic tokens for `Lean/Elab/Do.lean` took a full 5s. In
practice, this means that while elaborating the file, one core is
entirely busy with computing the semantic tokens for the file.

This PR fixes this performance bug by re-implementing the semantic token
handling, reducing the latency for `Lean/Elab/Do.lean` from 5s to 60ms.
As a result, the overly cautious refresh latency of 5s in #3925 can
easily be reduced to 2s again.

Since the previous semantic tokens implementation used a very brittle
hack to identify projections, this PR also changes the projection
notation elaboration to augment the `InfoTree` syntax for the field of a
projection with a special syntax node of kind
`Lean.Parser.Term.identProjKind`. With this syntax kind, projection
fields can now easily be identified in the `InfoTree`.
2024-04-18 07:48:44 +00:00
..
bin feat: Web Assembly Build (#2599) 2023-10-04 09:04:20 +02:00
cmake
include/lean perf: faster Nat.repr implementation in C (#3876) 2024-04-17 18:11:05 +00:00
Init perf: faster Nat.repr implementation in C (#3876) 2024-04-17 18:11:05 +00:00
initialize chore: fix more typos in comments 2023-10-08 14:37:34 -07:00
kernel perf: isDefEq performance issue (#3807) 2024-03-30 02:15:48 +00:00
lake feat: lake lean (#3793) 2024-03-29 22:54:31 +00:00
Lean fix: semantic tokens performance (#3932) 2024-04-18 07:48:44 +00:00
library perf: LLVM backend, put all allocas in the first BB to enable mem2reg (#3244) 2024-02-13 14:54:40 +00:00
runtime perf: faster Nat.repr implementation in C (#3876) 2024-04-17 18:11:05 +00:00
shell fix: do not dllexport symbols in core static libraries (#3601) 2024-03-15 11:58:34 +00:00
util fix: remove target triple parameter from FFI that no longer exists in the Lean API 2023-11-02 23:21:47 +01:00
CMakeLists.txt chore: update-stage0-commit cmake target (#3692) 2024-04-04 13:35:53 +00:00
config.h.in
githash.h.in
Init.lean chore: reorganising to reduce imports (#3790) 2024-03-27 11:15:01 +00:00
lean-toolchain doc: VS Code dev setup (#2961) 2023-11-30 08:35:03 +00:00
Lean.lean feat: reserved names (#3675) 2024-03-15 00:33:22 +00:00
lean.mk.in fix: do not dllexport symbols in core static libraries (#3601) 2024-03-15 11:58:34 +00:00
Leanc.lean fix: do not dllexport symbols in core static libraries (#3601) 2024-03-15 11:58:34 +00:00
stdlib.make.in fix: do not dllexport symbols in core static libraries (#3601) 2024-03-15 11:58:34 +00:00
stdlib_flags.h chore: update domain 2023-09-20 15:13:27 -07:00
version.h.in feat: System.Platform.target (#3207) 2024-01-24 12:11:00 +00:00