Skip to content

Extension uses 100% of CPU when files.excludes contains a path starting with / #1303

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

Closed
kupuma-ru21 opened this issue Apr 8, 2025 · 6 comments · Fixed by #1307
Closed

Extension uses 100% of CPU when files.excludes contains a path starting with / #1303

kupuma-ru21 opened this issue Apr 8, 2025 · 6 comments · Fixed by #1307
Labels
question Further information is requested

Comments

@kupuma-ru21
Copy link

kupuma-ru21 commented Apr 8, 2025

What version of VS Code are you using?
v1.99.0

For example: v1.78.2

What version of Tailwind CSS IntelliSense are you using?
v0.14.14

For example: v0.7.0

What version of Tailwind CSS are you using?
Not using

For example: v2.0.4

What package manager are you using?
pnpm

For example: npm, yarn

What operating system are you using?
macOS

For example: macOS, Windows

Tailwind config

No config

// Paste the contents of your Tailwind config file here

VS Code settings

{
  "// Typescript": "",
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "typescript.surveys.enabled": false,
  "typescript.updateImportsOnFileMove.enabled": "always",
  "typescript.tsserver.experimental.enableProjectDiagnostics": false,
  "typescript.tsserver.log": "off",
  "// Go": "",
  "[go]": {
    "editor.defaultFormatter": "golang.go",
    "editor.formatOnSave": true
  },
  "gopls": {
    "ui.diagnostic.staticcheck": true
  },
  "go.showWelcome": false,
  "go.toolsManagement.autoUpdate": true,
  "// Javascript": "",
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "javascript.updateImportsOnFileMove.enabled": "always",
  "// Json": "",
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "// Graphql": "",
  "[graphql]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "// Markdown": "",
  "[markdown]": {
    "REF": "https://jsnotice.com/posts/2021-05-27/",
    "editor.formatOnSave": false
  },
  "// HTML": "",
  "// REF: html.autoClosingTags": "https://stackoverflow.com/questions/49391798/vs-code-turn-off-auto-close-tags-but-leave-on-autocomplete#:~:text=Go%20to%20File%20%3E%20Preferences%20%3E%20Settings,make%20it%20autocomplete%20for%20you",
  "html.autoClosingTags": true,
  "// Terminal": "",
  "terminal.integrated.tabs.enabled": false,
  "terminal.integrated.letterSpacing": -0.5,
  "terminal.integrated.env.osx": {
    "VSCODE_WORKSPACE": "${workspaceFolder}",
    "Q_NEW_SESSION": "1"
  },
  "terminal.integrated.env.linux": {
    "VSCODE_WORKSPACE": "${workspaceFolder}"
  },
  "terminal.integrated.defaultProfile.osx": "tmux",
  "terminal.integrated.suggest.enabled": true,
  "// Editor": "",
  "editor.guides.bracketPairs": true,
  "editor.codeActionsOnSave": {
    "source.addMissingImports": "explicit",
    "source.fixAll.eslint": "explicit"
  },
  "editor.tabSize": 2,
  "editor.glyphMargin": false,
  "editor.minimap.enabled": false,
  "editor.letterSpacing": -0.7,
  "editor.rename.enablePreview": false,
  "extensions.ignoreRecommendations": true,
  "editor.wordWrap": "on",
  "editor.renderControlCharacters": true,
  "editor.accessibilitySupport": "off",
  "editor.lineHeight": 14,
  "// Window": "",
  "window.zoomLevel": 1.5,
  "window.commandCenter": false,
  "window.title": " ",
  "// Files": "",
  "files.insertFinalNewline": true,
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 1000,
  "files.trimTrailingWhitespace": true,
  "// Workbench": "",
  "workbench.iconTheme": "vscode-icons",
  "workbench.editor.enablePreview": false,
  "workbench.welcomePage.walkthroughs.openOnInstall": false,
  "workbench.startupEditor": "none",
  "workbench.colorCustomizations": {
    "editor.lineHighlightBackground": "#ffeb3b66"
  },
  "// Explorer": "",
  "explorer.confirmDelete": false,
  "explorer.compactFolders": false,
  "// Prettier": "",
  "prettier.bracketSpacing": false,
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "vsicons.dontShowNewVersionMessage": true,
  "gitlens.plusFeatures.enabled": false,
  "workbench.colorTheme": "Gruvbox Dark (Hard)",
  "files.exclude": {
    "frontend/node_modules": true,
    "/.cache": true,
    "/build": true,
    "backend/node_modules": true,
    ".git": true
  },
  "files.watcherExclude": {
    "frontend/node_modules": true,
    "/.cache": true,
    "/build": true,
    "backend/node_modules": true,
    ".git": true
  },
  "search.exclude": {
    "frontend/node_modules": true,
    "/.cache": true,
    "/build": true,
    "backend/node_modules": true,
    ".git": true
  },
  "workbench.activityBar.location": "hidden"
}

Reproduction URL

A public GitHub repo that includes a minimal reproduction of the bug. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways.

Describe your issue

When I open vscode with this extension, CPU becomes 100% all the time

Image

Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead

@thecrypticace
Copy link
Contributor

Hey, I've fixed some of these issues in v0.14.14 so not quite sure why this would still be happening:

  1. Is it possible for you to provide a reproduction repository — this would be helpful?
  2. Can you provide the output shown by running "Tailwind CSS: Show Output" in the command palette?

@thecrypticace thecrypticace added the question Further information is requested label Apr 8, 2025
@tworonin
Copy link

tworonin commented Apr 8, 2025

I ran into this issue today and was able to resolve it using the suggestion from the thread on #1261 (comment). Just wanted to mention it here in case it might be helpful.

Side note: quitting vscode would not kill the 100% Code Helper (Plugin) process, I had to manually quit the process in Activity Monitor.

@kupuma-ru21
Copy link
Author

kupuma-ru21 commented Apr 9, 2025

@thecrypticace

  1. Is it possible for you to provide a reproduction repository — this would be helpful?

Sure, the reproduction repository is this.
https://github.com/kupuma-ru21/stripe

  1. Can you provide the output shown by running "Tailwind CSS: Show Output" in the command palette?
Locating server…
Booting server...
Setting up server…
Listening for messages…
Searching for Tailwind CSS projects in the workspace's folders.

I guess VS Code settings are part of the reason for this issue because it doesn't happen when I delete files.exclude, files.watcherExclude, and search.exclude.
But I'm not sure exactly.

@thecrypticace
Copy link
Contributor

Ah yes, there's a bug with files.exclude handling right now. Gonna try to fix that and push a release out in the morning.

@thecrypticace thecrypticace changed the title Extension uses 100% of CPU on mac with m2 Extension uses 100% of CPU when files.excludes contains a path starting with / Apr 9, 2025
@thecrypticace
Copy link
Contributor

I have a workaround and I'm gonna get a release out in the next 30m-ish (hopefully)

@thecrypticace
Copy link
Contributor

That release is out now with the workaround — let me know if you run into any more issues

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

Successfully merging a pull request may close this issue.

3 participants