lean4-htt/src/Init
Marc Huisinga 7ba0ae1f72
feat: improve auto-completion performance (#10249)
This PR speeds up auto-completion by a factor of ~3.5x through various
performance improvements in the language server. On one machine, with
`import Mathlib`, completing `i` used to take 3200ms and now instead
yields a result in 920ms.

Specifically, the following improvements are made:
- The watchdog process no longer de-serializes and re-serializes most
messages from the file worker before passing them on to the user - a
fast partial de-serialization procedure is now used to determine whether
the message needs to be de-serialized in full or not.
- `escapePart` is optimized to perform better on ASCII strings that do
not need escaping.
- `Json.compress` is optimized to allocate fewer objects.
- A faster JSON compression specifically for completion responses is
implemented that skips allocating `Json` altogether.
- The JSON compression has been moved to the task where we convert a
request response to `Json` so that converting to a string won't block
the output task of the FileWorker and so the `Json` value is not marked
as multi-threaded when we compress is, which drastically increases the
cost of reference-counting.
- The JSON representation of the `data?` field of each completion item
is optimized.
- Both the completion kind and the set of completion tags for each
imported completion item is now cached.
- The filtering of duplicate completion items is optimized.

Other adjustments:
- `LT UInt8` and `LE UInt8` are moved to Prelude so that they can be
used in `Init.Meta` for the name part escaping fast path.
- `Array.usize` is exposed since it was marked as `@[simp]`.
2025-09-05 08:55:49 +00:00
..
Control chore: avoid confusing public import all combination (#10051) 2025-08-22 12:04:42 +00:00
Data feat: improve auto-completion performance (#10249) 2025-09-05 08:55:49 +00:00
Grind chore: fix typo (#10251) 2025-09-04 16:05:00 +00:00
GrindInstances chore: replace Lean.Grind internal preorder classes with the classes from Std (#10129) 2025-08-26 13:18:22 +00:00
Internal feat: add more MonoBind instances for monad transformers (#10230) 2025-09-03 17:15:41 +00:00
Omega feat: (approximate) inverses of dyadic rationals (#10194) 2025-09-02 03:43:53 +00:00
System feat: integrate high-level order typeclasses with BEq and Ord (#9908) 2025-08-19 07:54:53 +00:00
BinderNameHint.lean chore: fix spelling errors (#9175) 2025-07-24 23:35:32 +00:00
BinderPredicates.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
ByCases.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Classical.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Coe.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Control.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Conv.lean feat: add enter [in patt] syntax (#10081) 2025-08-23 17:16:53 +00:00
Core.lean chore: remove bootstrap tricks from #9951 (#10203) 2025-09-01 13:30:42 +00:00
Data.lean feat: dyadic rationals (#9993) 2025-08-26 03:49:39 +00:00
Dynamic.lean perf: do not export opaque bodies (#10119) 2025-08-27 20:59:59 +00:00
Ext.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
GetElem.lean chore: remove >6 month old deprecations (#9640) 2025-08-05 02:29:15 +00:00
Grind.lean feat: AC theorems for grind (#10093) 2025-08-24 05:02:37 +00:00
GrindInstances.lean feat: upstream several Rat lemmas from mathlib (#10077) 2025-08-25 06:02:27 +00:00
Guard.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Hints.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Internal.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
MacroTrace.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Meta.lean feat: improve auto-completion performance (#10249) 2025-09-05 08:55:49 +00:00
MetaTypes.lean feat: improve grind cutsat support for Fin n when n is not a numeral (#10022) 2025-08-21 17:25:52 +00:00
Notation.lean feat: allow position reporting in #guard_msgs (#10125) 2025-08-27 06:47:34 +00:00
NotationExtra.lean chore: warn on [expose] on private definition (#9917) 2025-08-15 11:31:33 +00:00
Omega.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Prelude.lean feat: improve auto-completion performance (#10249) 2025-09-05 08:55:49 +00:00
PropLemmas.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
RCases.lean fix: add missing spaces for pretty printing (#9475) 2025-07-23 19:35:04 +00:00
ShareCommon.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
SimpLemmas.lean fix: performance issue when elaborating match-expressions with many literals (#9372) 2025-07-15 03:52:23 +00:00
Simproc.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
SizeOf.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
SizeOfLemmas.lean chore: avoid confusing public import all combination (#10051) 2025-08-22 12:04:42 +00:00
Syntax.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
System.lean chore: remove >6 month old deprecations (#9640) 2025-08-05 02:29:15 +00:00
Tactics.lean chore: eliminate uses of intros x y z (#9983) 2025-08-19 06:09:13 +00:00
TacticsExtra.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Task.lean refactor: implement IO.waitAny using Lean (#9732) 2025-08-06 13:09:15 +00:00
Try.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
Util.lean feat: improve auto-completion performance (#10249) 2025-09-05 08:55:49 +00:00
WF.lean feat: add @[grind =] to Prod.lex_def (#9609) 2025-07-29 02:45:02 +00:00
WFTactics.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00
While.lean feat: make private the default in module (#9044) 2025-06-28 16:30:53 +00:00