vscode-colorize icon indicating copy to clipboard operation
vscode-colorize copied to clipboard

Extension causes high cpu load

Open jpcodering opened this issue 6 years ago • 7 comments

  • Issue Type: Performance
  • Extension Name: vscode-colorize
  • Extension Version: 0.8.13
  • OS Version: Darwin x64 15.6.0
  • VSCode version: 1.38.1

:warning: Make sure to attach this file from your home-directory: :warning:/Users/tipografia/kamikillerto.vscode-colorize-unresponsive.cpuprofile.txt

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

jpcodering avatar Sep 17 '19 06:09 jpcodering

@plasticode you forgot to upload the file ^^

KamiKillertO avatar Sep 17 '19 10:09 KamiKillertO

The extension is very good, but I noticed a performance theft from my machine just minutes after installation.

brunos3d avatar Sep 18 '19 13:09 brunos3d

Thanks @mahdizakizadeh for the file, I'll have a look. I'm well aware of the performance issues, I'm working on it.

However there's already ways to reduce/fix them. Colorize have a lots of settings with default values that target a wide range of files/languages. By changing those settings you can reduce the amount of work done by colorize everytimes you open a project or a file.

For exemple by default colorize generate background colors for every colors in the opened files, by setting colorize.colorize_only_visible_beta to true, colorize will only generate background for the visible part of the file(this setting can have huge impact when working on large files).

By default colorize generate background for SASS,LESS,CSS,STYLUS variables, but this also have some performance impact because the extension need to scan all files in a project in order to find the variables declarations. The setting colorize.colorized_variables let you define a list of variables that will be colorized. If you only use SASS change this setting to colorize.colorized_variables: ["SASS"] that way the extension will only search SASS variables.

All settings are listed here

KamiKillertO avatar Sep 18 '19 17:09 KamiKillertO

@KamiKillertO just want to say thanks for all your hard work

dmcreativestudios avatar Sep 26 '19 13:09 dmcreativestudios

still getting vscode notification periodically although I enabledcolorize_only_visible_beta

a7madgamal avatar Nov 13 '20 11:11 a7madgamal

Yeah tried all the method above still the cpu and the memory hog

Ankan-cyber avatar Aug 22 '23 07:08 Ankan-cyber