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

High CPU, memory usage and OS crash when JSDoc importing "/dev/random" #1158

Open
nnmrts opened this issue Sep 6, 2024 · 0 comments
Open

Comments

@nnmrts
Copy link

nnmrts commented Sep 6, 2024

Describe the bug

Deno's CPU and memory usage is exploding and sometimes even causing an OS freeze and/or crash when hovering over a JSDoc type based on imported "/dev/random".

To Reproduce

  1. Install the deno extension.
  2. Create .vscode/settings.json
    {
    	"deno.enable": true
    }
  3. Create test.js
    /**
     * @import random from "/dev/random";
     */
    
    /**
     * @typedef {`${random}`} Test
     */
  4. Now hover over Test and watch your CPU and memory melting until everything freezes and/or crashes.

Expected behavior

Without the extension enabled, vscode falls back to normal TypeScript, which displays Test as just ${random} and doesn't cause any issues. The deno extension should probably do the same.

Versions

vscode: 1.93.0-insider deno: 2.0.0-rc.1 extension: 3.39.0

Device
MacBook Pro 13", M2, 2022, 8 GB, macOS 15.0 Beta (24A5327a)

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

1 participant