Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

Code Outline with unformatted JSON, high CPU #90

Open
JayNaire opened this issue Mar 2, 2018 · 1 comment
Open

Code Outline with unformatted JSON, high CPU #90

JayNaire opened this issue Mar 2, 2018 · 1 comment

Comments

@JayNaire
Copy link

JayNaire commented Mar 2, 2018

Just an observation, (file under FYI) :

Opening a JSON "log" file (about 200kB, rough format below) that doesn't contain any formatting / newlines incurs 100% CPU time for about 13 minutes. The code outline then appears correctly and all is well.

Formatting the document, saving and reopening results in no hogging and a delay of just 2 seconds or less before the outline appears.

Whether the hog is from native vscode json or Code Outline I know not.
code --status says
CPU% is 100% for extensionHost when hogging occurs
CPU% is 0% for electron_node jsonServerMain.js

FWIW: JSON format:

{
"roomTemperatures": {
"Room1": [
{
"x": "2018-02-16T12:45:47.623Z",
"y": 20.3
},
...another 500 data points
],
...another 13 rooms
}

@patrys
Copy link
Owner

patrys commented Mar 2, 2018

Code Outline does not do any document parsing on its own and relies on the SymbolProvider API to be implemented by specific language extensions. I believe the JSON one is built into VS Code itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants