microsoft / vscode-docs-authoring

VSCode extension that provides markdown authoring assistance to docs.microsoft.com contributors
MIT License
138 stars 97 forks source link

Release of 0.1.14 results in reduced responsiveness #912

Open guardrex opened 2 years ago

guardrex commented 2 years ago

Not sure if I've titled this issue well. Feel free to change the title.

This morning, I woke up to version 0.1.14, which was released last night. The Enter key wasn't responsive, but it goes beyond that. Many behaviors are slow. Saving a file takes several seconds. I was able to restore VSC's speed by disabling the Docs Authoring Pack extension and restarting VSC. If I re-enable the extension, the slowness returns immediately.

Capture

Not sure if this is related, but after disabling the extension, I see the following error in the OUTPUT panel. This error is appearing every time I open VSC with the Docs Authoring Pack and Docs Linting (docs-linting) extensions disabled.

[7:10:39 AM] ERROR: Exception while linting with markdownlint-cli2:
Error: Cannot find module '{docsmsft.docs-linting}/markdownlint-custom-rules/rules.js'
Require stack:
- c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:934:15)
    at Function.v.resolve (c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:760)
    at e.exports (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:33:4950)
    at w (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:850)
    at c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:887
    at Array.map (<anonymous>)
    at E (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:879)
    at T (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:2467)
    at async L (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:5511)
[7:10:39 AM] ERROR: Exception while linting with markdownlint-cli2:
Error: Cannot find module '{docsmsft.docs-linting}/markdownlint-custom-rules/rules.js'
Require stack:
- c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:934:15)
    at Function.v.resolve (c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:760)
    at e.exports (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:33:4950)
    at w (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:850)
    at c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:887
    at Array.map (<anonymous>)
    at E (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:879)
    at T (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:2467)
    at async L (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:5511)
[7:10:39 AM] ERROR: Exception while linting with markdownlint-cli2:
Error: Cannot find module '{docsmsft.docs-linting}/markdownlint-custom-rules/rules.js'
Require stack:
- c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-amd.js
- c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\bootstrap-fork.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:934:15)
    at Function.v.resolve (c:\Users\XXXXXXXXX\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\loader.js:4:760)
    at e.exports (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:33:4950)
    at w (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:850)
    at c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:887
    at Array.map (<anonymous>)
    at E (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:879)
    at T (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:2467)
    at async L (c:\Users\XXXXXXXXX\.vscode\extensions\davidanson.vscode-markdownlint-0.43.2\bundle.js:37:5511)
guardrex commented 2 years ago

I'll research this, but can I rollback to 0.1.13 and stay on that until this is addressed? That error is continuing to pop-up under use with the extension disabled and it seems to be sucking my cursor away from the editing workspace ... so it's slowing me down to have to click back into the workspace to continue working.

UPDATE: If I disable the markdownlint extension, that stops the error. I'll try re-enabling the Docs Authoring Pack (without markdownlint) and see what happens.

UPDATE: No 🎲🎲: It doesn't permit only disabling the markdownlint extension. It requires the Docs Authoring Pack extension, so they all must be disabled.

shhazam-ms commented 2 years ago

I am experiencing the same thing

adegeo commented 2 years ago

Same thing. To help debug this, this happened ALL the time if I went into airplane mode. I think the authoring pack is constantly talking to a backend server and when it doesn't respond it chokes between commands or something.

joe-atzinger commented 2 years ago

Screen Shot 2021-08-10 at 5 09 41 PM I did a profile on the extension while hitting some keys and trying to backspace. Hitting backspace is where all the delay becomes unacceptable for me, though typing the text is a bit less smooth than normal.

The problem persists even when going back to 1.13. The offending dependency seems to be docs-visual-areas.

guardrex commented 2 years ago

That one had a release 22 hours ago, so the timing of the problems matches.

Capture

https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-visual-areas

adegeo commented 2 years ago

This has been happening to me for a few days, but I actually think I installed docs visual areas manually a few days ago. But this did ALWAYS happen when I was in the car working on a road trip or something with no internet.

joe-atzinger commented 2 years ago

That one had a release 22 hours ago, so the timing of the problems matches.

(removed image)

https://marketplace.visualstudio.com/items?itemName=docsmsft.docs-visual-areas

I don't see anything obvious in yesterday's changes which would cause this. Making sure @bharney0 sees this ticket.

bharney0 commented 2 years ago

Thank you all for letting us know. I will be rolling this back to the previous version until we resolve the issue. Sorry for any inconvenience. @joe-atzinger @adegeo @guardrex @shhazam-ms

I think this also brings up another issue related to connectivity to the internet while these extensions are enabled. I will be looking into these issues.

guardrex commented 2 years ago

I think you're right @joe-atzinger ... I rolled back to 0.1.13 of the Docs Authoring Pack ... that did not restore good speed. But then, I uninstalled docs-visual-areas ... Bingo! ... I immediately got responsiveness back.

bharney0 commented 2 years ago

I will let the original authors @johnpapa, @craigshoemaker of docs-visual-areas know there is an issue with responsiveness. We appreciate the community letting us know so quickly. Unfortunately I am not sure if I remove the new extension from the pack it will disable/uninstall it (unlikely). You will probably need to do that manually even though it will be temporarily removed from the docs authoring pack.

cc @meganbradley @lamebrain @adunndevster @stevenkuhn @jamarw

guardrex commented 2 years ago

That matches what happened. I rolled back the authoring pack, but docs-visual-areas remained ... and it remained enabled. Rolling back the authoring pack dropped the dependency on docs-visual-areas ... then I was able to uninstall docs-visual-areas at that point and get responsiveness back.

johnpapa commented 2 years ago

Thanks for sharing the feedback in here. We welcome as much as you can share about the slowdowns so we can investigate this. It is not obvious as to what may be causing it if it is indeed in docs visual areas, which it looks like it is.

For information only ... docs visual areas scans the markdown file (only markdown files) when changes occur in the file to detect if there are zone pivots or tab groups. This scanning could be a problem if it was triggered by something else. I am guessing that may be the issue ... that something may be causing that to trigger uncontrollably. I may need help testing this out ... to create some releases of the extension where people can try it (beta testers) to see if it happens again and I log additional information so we can analyze the root cause.

Anyway - I will investigate with the co authors more and see if I can stop guessing :) and start having a better idea of why this may be the issue.