vscode-interactive-graphviz icon indicating copy to clipboard operation
vscode-interactive-graphviz copied to clipboard

Extension causes high cpu load

Open nooelan opened this issue 2 years ago • 6 comments

  • 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

:warning: Make sure to attach this file from your home-directory: :warning: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

nooelan avatar Aug 16 '22 12:08 nooelan

How big was the graph you tried to render?

bigbug avatar Aug 16 '22 12:08 bigbug

The graph consists of:

4 subgraphs with a total of 58 nodes, and 103 edges

Regards, Øyvind @.***

Øyvind A. Landsnes Senior Principal Engineer Lead Software Architect abb.comhttps://www.abb.com/

From: bigbug @.> Sent: tirsdag 16. august 2022 14:42 To: tintinweb/vscode-interactive-graphviz @.> Cc: Oeyvind Landsnes @.>; Author @.> Subject: Re: [tintinweb/vscode-interactive-graphviz] Extension causes high cpu load (Issue #129)

BeSecure! This email comes from outside of ABB. Make sure you verify the sender before clicking any links or downloading/opening attachments. If this email looks suspicious, report it by clicking 'Report Phishing' button in Outlook or raising a ticket on MyIS.

How big was the graph you tried to render?

Reply to this email directly, view it on GitHubhttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftintinweb%2Fvscode-interactive-graphviz%2Fissues%2F129%23issuecomment-1216584189&data=05%7C01%7Coeyvind.landsnes%40no.abb.com%7C1fff4d644b924e4aae7108da7f84c708%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C637962505503105468%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TxZGQlCa2bjfd84g9dNng%2BoL7MWl6gKVuIs%2FA4opgU0%3D&reserved=0, or unsubscribehttps://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAENARZ5OAK7I3OOJ7QYJJXTVZOEDFANCNFSM56VVARRA&data=05%7C01%7Coeyvind.landsnes%40no.abb.com%7C1fff4d644b924e4aae7108da7f84c708%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C637962505503261682%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=n4bomduzBQpCTkc3R%2BeoOiyf%2BQrMsvIh6uY0LRtAi%2F0%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.@.>>

nooelan avatar Aug 16 '22 13:08 nooelan

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

zkxs avatar Feb 21 '23 20:02 zkxs

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

Zannick avatar Feb 25 '23 22:02 Zannick

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.

RagingTonberry avatar Mar 15 '23 00:03 RagingTonberry

Any news for this? Having the same issue.

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

obemu avatar May 03 '23 12:05 obemu