anseki / vscode-color

Helper with GUI to generate color codes such as CSS color notations.
MIT License
97 stars 27 forks source link

Child process IPC message fails on Windows - BTW why soooo big for a color picker (137MB) #72

Closed vhanla closed 6 years ago

vhanla commented 6 years ago

Steps to Reproduce:

  1. Start, restart, uninstall, reinstall
  2. Invoke Pick Color from Command Palette (ctrl+shift+p)
  3. I doesn't do anything

I even did npm install from extension's directory. It was 121MB then 137MB in size. So big for a color picker IMHO. Maybe you can opt out electron and use FreePascal to create a multiplatform picker or any other programming language.

Log (All lines): (Click menu of VS Code "Help > Toggle Developer Tools", and click "Console" tab)

[Extension Host] Start child process...
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Check version of: electron-prebuilt
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Check version of: comma-separated-values
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Check version of: js-yaml
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Check version of: process-bridge
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Try to send IPC message: 1
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Try to send IPC message: 2
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Child process disconnected
/C:/Program Files (x86)/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:263 [Extension Host] Child process exited with code: 0
anseki commented 6 years ago

Hi @vhanla, thank you for the report.

As far as I see your report, it seems that the child process IPC message did not fail. Why you thought that? Could you give me more details?

If you mean that a dialog box was not shown, try to specify 1 for colorHelper.disableGpu option.

BTW, file size (vsix file) of Color Picker is 296KB (not MB). Electron is installed in to node_modules directory if you don't have it. Also, VS Code is an app based Electron. That is required for GUI.

anseki commented 6 years ago

If you want, please make a new issue about Electron or the file size. Don't comment here about that.

vhanla commented 6 years ago

Thank you, that was it! 👍


About the size, this is how it uses disk space in my extensions directory: 2018-05-18 14_27_47-treesize free

I know it is because of Electron (another instance of chromium), not the extension itself (without node_modules) xD 2018-05-18 14_29_32-treesize free

Electron executable here shown belongs to Color Picker (i.e. it is invoked by this extension), VSCode executable is Electron itself (modified of course), two instances (60MB RAM). 2018-05-18 14_47_19-color picker

So, Electron from VSCode is not reusable, it has to download the Electron binary (executable electron.exe 70.4MB for this electron-prebuilt version) inside node_modules.

Electron-Prebuilt is deprecated, the extension uses version 0.37.3 (March 2016), latest release was April 2017 (v.1.3.15) and last pre-release (v1.6.12) on August 2017. Though, I don't think the vast collection of CVEs might become a problem, maybe I should be wrong.

Conclusion: Extension is awesome, on cold boot it is slow, but afterwards it is fast. Overall, I don't mind the size NOW, since it is working. However, I still would prefer a native application instead of Electron.

anseki commented 6 years ago

Thank you for the reply. :smile:

I also think that you are wrong. However, as I said, you should not comment here about Electron.