Skip to content

40% CPU and Gigs of memory used parsing a map #20279

Closed
@mjbvz

Description

@mjbvz

From @bootstraponline on November 23, 2017 1:25

  • VSCode Version: 1.18.1
  • OS Version: Windows 10 Version 1709 (OS Build 16299.19)

Steps to Reproduce:

  1. git clone https://github.com/bootstraponline/hex.git
  2. git checkout dbf422b1856d054b01bd28193ca52ed9c4033ceb
  3. Open hex/ts/ in Visual Studio Code
  4. Change anything in the TypeScript files
  5. Observe gigs of memory used.

image

image

Reproduces without extensions: Yes

I have a large map. That appears to make TypeScript crazy. I'm not sure if there's a way to disable processing on a per file basis. This issue does not happen when using JSON instead of a map.

export let codes = new Map([
   ['03310001', ['Potion', 'Battle Items [0]', true]],
   // ...
]);

Copied from original issue: microsoft/vscode#38993

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions