Skip to content

Semantic colorization requested for entire (large) file instead of viewport area #92963

Closed
@RyanCavanaugh

Description

@RyanCavanaugh
  • VSCode Version: 1.43 (UX regression from 1.42)
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open Microsoft/typescript src/compiler/checker.ts (~36,000 lines)
  2. Request completion somewhere in the file after a little warm-up
  3. Observe delay: ~8 seconds on a middle-of-the-road machine
  4. Turn off semantic highlighting
  5. Try again: Delay is more like ~3 seconds

The root cause seems to be VS Code sending repeated commands on edit for

Info 250  [10:51:9.601] request:
    {"seq":27,"type":"request","command":"encodedSemanticClassifications-full","arguments":{"file":"d:/github/TypeScript/src/compiler/checker.ts","start":0,"length":2188700}}

specifically

"start":0,"length":2188700 <- too much!

which in turn causes TS Server to perform a ton of work highlighting nonvisible parts of the file

Does this issue occur when all extensions are disabled?: Yes

It seems like this was being discussed at #86415 but raising this for clarity of impact

Metadata

Metadata

Assignees

Labels

freeze-slow-crash-leakVS Code crashing, performance, freeze and memory leak issuessemantic-tokensSemantic tokens issuestypescriptTypescript support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions