Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension causes high cpu load #129

Open
nooelan opened this issue Aug 16, 2022 · 6 comments
Open

Extension causes high cpu load #129

nooelan opened this issue Aug 16, 2022 · 6 comments

Comments

@nooelan
Copy link

nooelan commented Aug 16, 2022

  • Issue Type: Performance
  • Extension Name: graphviz-interactive-preview
  • Extension Version: 0.3.1
  • OS Version: Windows_NT x64 10.0.19044
  • VS Code version: 1.70.1

⚠️ Make sure to attach this file from your home-directory:
⚠️file:///c%3A/Users/NOOELAN/AppData/Local/Temp/tintinweb.graphv [tintinweb.graphviz-interactive-preview-unresponsive.cpuprofile.txt](https://github.com/tintinweb/vscode-interactive-graphviz/files/9350987/tintinweb.graphviz-interactive-preview-unresponsive.cpuprofile.txt) iz-interactive-preview-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

@bigbug
Copy link
Collaborator

bigbug commented Aug 16, 2022

How big was the graph you tried to render?

@nooelan
Copy link
Author

nooelan commented Aug 16, 2022 via email

@zkxs
Copy link

zkxs commented Feb 21, 2023

The extension has started locking up itself and other vscode extensions for me when previewing a .dot file it previously was able to render ~10 months ago. I can't help but wonder if this is a vscode issue. Perhaps it's stricter now in killing extensions that are CPU-hungry.

  • Extension Version: v0.3.5
  • OS Version: Windows_NT x64 10.0.19044
  • VS Code version: 1.75.1

After some testing of various graphs I have lying around:

  • 9 nodes and 18 edges works
  • 73 nodes and 90 edges works
  • 74 nodes and 102 edges works
  • 64 nodes and 65 edges fails. File: outer-wilds-no-dlc.dot
  • 100 nodes and 102 edges fails. File: outer-wilds.dot (this file specifically used to work ~10 months ago)

I see this frequently:

The extension 'Graphviz Interactive Preview' took a very long time to complete its last operation and it has prevented other extensions from running.

And sometimes this:

Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

Finally, here's the profiling information that vscode really wants me to attach: tintinweb.graphviz-interactive-preview-unresponsive.cpuprofile.txt

@Zannick
Copy link

Zannick commented Feb 25, 2023

I've only started using the extension today and it locks up so frequently (Rendering Graphviz view) when I preview an autogenerated dot file that I have to close and reopen vscode to be able to run other build tasks or see Github status. I can't really use the extension like this.

The hangs tend to happen more when the preview window is open, so it looks like a recurrence of (or has the same core issue as) #138.

And maybe 50% of the time when I reopen vscode, the extension fails to show any preview, with the The document is in an invalid state.. error mentioned above, and I have to close and reopen again to try it.

Extension version: 0.3.5
VSCode Version: 1.75.1
OS: Linux x64 6.1.7-200.fc37.x86_64

@RagingTonberry
Copy link

Just leaving my two cents that I am experiencing the same issues described by @Zannick from two weeks ago. Seems like a great extension aside from this issue.
I get the problem whenever I make edits to the file with the preview open. It does eventually render (as it did while I was typing this). My entire graph is 24 nodes and around 30 edges. Also using 0.3.5 on 1.76.0 on windows 11.

@obemu
Copy link

obemu commented May 3, 2023

Any news for this? Having the same issue.

Ext version: v0.3.5
VSCodium vers: v1.77.3
Platform: Ubuntu 22.04

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

No branches or pull requests

6 participants