Repository navigation
Extremely long build times compared to vscode #6891
Copy link
Copy link
Closed as not planned
Labels
bugSomething isn't workingSomething isn't workingtriageThis issue needs to be triaged by a maintainerThis issue needs to be triaged by a maintainer
Description
Is there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser:
- Local OS: Windows
- Remote OS: Ubuntu 22.04
- Remote Architecture: x 64
code-server --version: fb3e3e1
Steps to Reproduce
#!/bin/bash
# code server
# https://github.com/coder/code-server/issues/3061
# https://github.com/coder/code-server/blob/main/docs/CONTRIBUTING.md#creating-a-standalone-release
git clone https://github.com/coder/code-server.git
cd code-server
git reset --hard
git submodule update --init
quilt push -a
echo "############################### yarn install ###################################"
yarn install
echo "############################### yarn build ###################################"
yarn build
echo "############################### yarn build:vscode ###################################"
VERSION=0.0.0 yarn build:vscode
yarn release
I ran my script above
Expected
I should get a release of code-server without errors
Actual
See the extremely long compilation time (50 minutes) and eventual error
Logs
############################### yarn build:vscode ###################################
yarn run v1.22.22
$ ./ci/build/build-vscode.sh
Updated 1 path from the index
$ node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js vscode-reh-web-linux-x64-min
[11:51:44] Using gulpfile ~/code-server/lib/vscode/gulpfile.js
[11:51:44] Starting 'vscode-reh-web-linux-x64-min'...
[11:51:44] Starting clean-out-build ...
[11:51:44] Finished clean-out-build after 17 ms
[11:51:44] Starting build-web-node-paths ...
[11:51:44] Finished build-web-node-paths after 2 ms
[11:51:44] Starting compile-api-proposal-names ...
[11:51:44] Starting compilation api-proposal-names...
[11:51:44] Finished compilation api-proposal-names with 0 errors after 98 ms
[11:51:44] Finished compile-api-proposal-names after 109 ms
[11:51:44] Starting compile-src ...
[11:52:04] [mangler] Done collecting. Classes: 7761. Exported symbols: 9479
[11:52:06] [mangler] Done creating class replacements
[11:52:06] [mangler] Starting prepare rename edits
[11:52:07] Starting compilation...
[12:41:23] [mangler] Done preparing edits: 3816 files
[12:41:30] [mangler] Done: 4811.749kb saved, memory-usage: {"total_heap_size":2651123712,"total_heap_size_executable":8101888,"total_physical_size":2650755072,"total_available_size":6032375144,"used_heap_size":2560729720,"heap_size_limit":8640266240,"malloced_memory":2138256,"peak_malloced_memory":20096896,"does_zap_garbage":0,"number_of_native_contexts":2,"number_of_detached_contexts":0,"total_global_handles_size":4694016,"used_global_handles_size":1841568,"external_memory":112479275}
[12:46:22] Finished compilation with 0 errors after 3254528 ms
[12:46:22] Finished compile-src after 3277528 ms
[12:46:22] Starting compile-build ...
[12:46:22] Finished compile-build after 14 ms
[12:46:22] Starting clean-extensions-build ...
[12:46:22] Finished clean-extensions-build after 2 ms
[12:46:22] Starting bundle-marketplace-extensions-build ...
[12:46:22] Downloading extension from GH: ms-vscode.js-debug-companion@1.1.2 ...
[12:46:22] Downloading extension from GH: ms-vscode.js-debug@1.91.0 ...
[12:46:22] Downloading extension from GH: ms-vscode.vscode-js-profile-table@1.0.9 ...
[12:46:25] Finished bundle-marketplace-extensions-build after 2739 ms
[12:46:25] Starting bundle-extensions-build ...
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
INFO Detected presence of yarn.lock. Using 'yarn' instead of 'npm' (to override this pass '--no-yarn' on the command line).
[12:47:14] Bundled extension: simple-browser/extension.webpack.config.js...
[12:47:15] Bundled extension: search-result/extension.webpack.config.js...
[12:47:16] Bundled extension: gulp/extension.webpack.config.js...
[12:47:16] Bundled extension: debug-auto-launch/extension.webpack.config.js...
[12:47:16] Bundled extension: jake/extension.webpack.config.js...
[12:47:16] Bundled extension: debug-server-ready/extension.webpack.config.js...
[12:47:16] Bundled extension: grunt/extension.webpack.config.js...
[12:47:16] Bundled extension: tunnel-forwarding/extension.webpack.config.js...
[12:47:22] Bundled extension: git-base/extension.webpack.config.js...
[12:47:22] Bundled extension: media-preview/extension.webpack.config.js...
[12:47:22] Bundled extension: references-view/extension.webpack.config.js...
[12:47:22] Bundled extension: markdown-math/extension.webpack.config.js...
[12:47:27] Bundled extension: ipynb/extension.webpack.config.js...
[12:47:31] Bundled extension: php-language-features/extension.webpack.config.js...
[12:47:39] Bundled extension: extension-editing/extension.webpack.config.js...
[12:47:45] Bundled extension: emmet/extension.webpack.config.js...
[12:47:52] Bundled extension: npm/extension.webpack.config.js...
[12:47:53] Bundled extension: merge-conflict/extension.webpack.config.js...
[12:47:54] Bundled extension: microsoft-authentication/extension.webpack.config.js...
[12:47:55] Bundled extension: github-authentication/extension.webpack.config.js...
[12:48:01] Bundled extension: css-language-features/extension.webpack.config.js...
[12:48:02] Bundled extension: typescript-language-features/extension.webpack.config.js...
[12:48:02] Bundled extension: git/extension.webpack.config.js...
[12:48:03] Bundled extension: json-language-features/server/extension.webpack.config.js...
[12:48:03] Bundled extension: css-language-features/server/extension.webpack.config.js...
[12:48:06] Bundled extension: configuration-editing/extension.webpack.config.js...
[12:48:06] Bundled extension: html-language-features/server/extension.webpack.config.js...
[12:48:07] Bundled extension: html-language-features/extension.webpack.config.js...
[12:48:08] Bundled extension: json-language-features/extension.webpack.config.js...
[12:48:08] Bundled extension: github/extension.webpack.config.js...
[12:48:11] Bundled extension: markdown-language-features/server/extension.webpack.config.js...
[12:48:13] Bundled extension: markdown-language-features/extension.webpack.config.js...
[12:48:13] Finished bundle-extensions-build after 107987 ms
[12:48:13] Starting compile-extensions-build ...
[12:48:13] Finished compile-extensions-build after 0 ms
[12:48:13] Starting compile-extension-media-build ...
[12:48:13] Finished esbuilding extension media /root/code-server/lib/vscode/extensions/markdown-language-features/esbuild-preview.js with 0 errors.
[12:48:13] Finished esbuilding extension media /root/code-server/lib/vscode/extensions/markdown-language-features/esbuild-notebook.js with 0 errors.
[12:48:13] Finished esbuilding extension media /root/code-server/lib/vscode/extensions/notebook-renderers/esbuild.js with 0 errors.
[12:48:13] Finished esbuilding extension media /root/code-server/lib/vscode/extensions/ipynb/esbuild.js with 0 errors.
[12:48:13] Finished esbuilding extension media /root/code-server/lib/vscode/extensions/simple-browser/esbuild-preview.js with 0 errors.
[12:48:13] Finished esbuilding extension media /root/code-server/lib/vscode/extensions/markdown-math/esbuild.js with 0 errors.
[12:48:13] Finished compile-extension-media-build after 252 ms
[12:48:13] Starting clean-out-vscode-reh-web ...
[12:48:13] Finished clean-out-vscode-reh-web after 2 ms
[12:48:13] Starting optimize-vscode-reh-web ...
[12:49:03] Finished optimize-vscode-reh-web after 49609 ms
[12:49:03] Starting clean-out-vscode-reh-web-min ...
[12:49:03] Finished clean-out-vscode-reh-web-min after 2 ms
[12:49:03] Starting minify-vscode-reh-web ...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
▲ [WARNING] The "??" operator here will always return the left operand [suspicious-nullish-coalescing]
out-vscode-reh-web/vs/workbench/workbench.web.main.js:457846:84:
457846 │ ...ewModel()?.getLineCount() * lineHeight) ?? editor.getContentHeight(); // Can't ju...
╵ ~~
The left operand of the "??" operator here will never be null or undefined, so it will always be
returned. This usually indicates a bug in your code:
out-vscode-reh-web/vs/workbench/workbench.web.main.js:457846:31:
457846 │ ...ntentHeight = (editor._getViewModel()?.getLineCount() * lineHeight) ?? editor.get...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▲ [WARNING] The "??" operator here will always return the left operand [suspicious-nullish-coalescing]
out-vscode-reh-web/vs/workbench/workbench.web.main.js:507813:88:
507813 │ ...return this.viewModel?.welcomeExperience === WelcomeExperience.ForWorkspace ?? true;
╵ ~~
The left operand of the "??" operator here will never be null or undefined, so it will always be
returned. This usually indicates a bug in your code:
out-vscode-reh-web/vs/workbench/workbench.web.main.js:507813:19:
507813 │ ... return this.viewModel?.welcomeExperience === WelcomeExperience.ForWorkspac...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▲ [WARNING] The "??" operator here will always return the left operand [suspicious-nullish-coalescing]
out-vscode-reh-web/vs/workbench/workbench.web.main.js:526708:141:
526708 │ ...EditorCapabilities(contributedEditor.id)?.supportsMultipleEditorsPerDocument ?? true
╵ ~~
The left operand of the "??" operator here will never be null or undefined, so it will always be
returned. This usually indicates a bug in your code:
out-vscode-reh-web/vs/workbench/workbench.web.main.js:526708:49:
526708 │ ...source: () => !this.getCustomEditorCapabilities(contributedEditor.id)?.supportsMu...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▲ [WARNING] The "??" operator here will always return the left operand [suspicious-nullish-coalescing]
out-vscode-reh-web/vs/workbench/workbench.web.main.js:527700:59:
527700 │ return !item?.handle.startsWith('vscode-command:') ?? false;
╵ ~~
The left operand of the "??" operator here will never be null or undefined, so it will always be
returned. This usually indicates a bug in your code:
out-vscode-reh-web/vs/workbench/workbench.web.main.js:527700:15:
527700 │ return !item?.handle.startsWith('vscode-command:') ?? false;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
▲ [WARNING] The "??" operator here will always return the left operand [suspicious-nullish-coalescing]
out-vscode-reh-web/vs/workbench/workbench.web.main.js:654197:50:
654197 │ return !!this.c?.rawValue?.hasFocus() ?? false;
╵ ~~
The left operand of the "??" operator here will never be null or undefined, so it will always be
returned. This usually indicates a bug in your code:
out-vscode-reh-web/vs/workbench/workbench.web.main.js:654197:19:
654197 │ return !!this.c?.rawValue?.hasFocus() ?? false;
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[12:49:15] Finished minify-vscode-reh-web after 12824 ms
[12:49:15] Starting node ...
[12:49:15] Downloading node.js 20.11.1 linux x64 from https://nodejs.org...
[12:49:15] Using SHA256 checksum for checking integrity: bf3a779bef19452da90fb88358ec2c57e0d2f882839b20dc6afc297b6aafc0d7
[12:49:22] Finished node after 6695 ms
[12:49:22] Starting clean-vscode-reh-web-linux-x64 ...
[12:49:22] Finished clean-vscode-reh-web-linux-x64 after 179 ms
[12:49:22] Starting vscode-reh-web-linux-x64-min-ci ...
[12:49:31] Finished vscode-reh-web-linux-x64-min-ci after 8501 ms
[12:49:31] Starting vscode-reh-web-linux-x64-min ...
[12:49:31] Finished vscode-reh-web-linux-x64-min after 0 ms
[12:49:31] Finished 'vscode-reh-web-linux-x64-min' after 58 min
Updated 1 path from the index
"fb3e3e1546d571e9973e86482bcd925c1918ec27"
Done in 3473.48s.
yarn run v1.22.22
$ ./ci/build/build-release.sh
npm notice created a lockfile as npm-shrinkwrap.json with version 3
npm notice created a lockfile as npm-shrinkwrap.json with version 3
npm notice created a lockfile as npm-shrinkwrap.json with version 3
rsync: [sender] link_stat "/root/code-server/out" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
error Command failed with exit code 23.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.Screenshot/Video
No response
Does this bug reproduce in native VS Code?
No, this works as expected in native VS Code
Does this bug reproduce in GitHub Codespaces?
This cannot be tested in GitHub Codespaces
Are you accessing code-server over a secure context?
- I am using a secure context.
Notes
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtriageThis issue needs to be triaged by a maintainerThis issue needs to be triaged by a maintainer
Activity
bilogic commentedon Jul 10, 2024
VSCode's
yarn watchin 4 minutescode-asher commentedon Jul 10, 2024
yarn build:vscoderunsyarn gulp vscode-reh-web-linux-x64-min, which should take significantly more time thanyarn watch.code-asher commentedon Jul 10, 2024
Also, the error appears from
yarn release, notyarn build:vscode, the latter seems to have completed successfully.That makes it sound like
yarn buildwas not ran, if theoutdirectory is missing. 🤔 We could detect this and print a message like "please run yarn build" or something like that.bilogic commentedon Jul 10, 2024
Thanks, the error was due to
node-typescriptnot installed, it's unclear to me why code-server needs it while VSCode did not.The last time I built code-server was in #3061, late 2023 which definitely did not take 1 hour, I don't think it even took 15 minutes, which is about my limit when I start looking into why.
Because of this long wait, I also tested on M1 Macbook Air 16GB RAM which took 4.5 hours(!!)
yarn watch?bilogic commentedon Jul 10, 2024
Running #3061 version again, it took 40 minutes
bilogic commentedon Jul 10, 2024
I guess what I'm trying to understand is:
code-asher commentedon Jul 10, 2024
I am not seeing
node-typescriptas a dependency in our code, nor do I see it referenced in the error message. All I see posted above is the rsync error. Where are you seeingnode-typsecript?You are right, I noticed this as well! But I never looked into why it is so much slower now. Part of the reason is that we are only passively maintaining code-server so I have not felt like it was worth the time to look into it.
In CI it takes about 50 minutes. I am not sure what the specs of the runners are though. I avoid building it locally at all costs. 😛
Yep, your understanding is right, but you are comparing
watchandbuild, which are very different. If you compare VS Code'syarn watchwith code-server'syarn watch, it will be a much better comparison.code-server's
yarn build:vscodeshould be compared with VS Code'syarn gulp vscode-reh-web-linux-x64-min. Building extracts language parts, does minification and optimization, and probably some other things. Personally, I still think this does not justify how slow it is but I have not looked into VS Code to see if it can be improved.All we do is run
yarn gulp vscode-reh-web-linux-x64-min. I think everything in that Gulp task is ran in series though.code-asher commentedon Jul 10, 2024
Ah forgot about the final two questions:
If you compare with the right task then it should be about the same. As to why building VS Code is this slow, I do not know. Maybe they need to switch away from Gulp to something else, or maybe it has something to do with their custom loader.
You should only use
yarn watchin development, notyarn build:vscode. Initial compilation should only be a few minutes, but the experience is still slow though, because it takes a long time in the browser to load all the sources. I think they should probably use bundling in development or at least load all the sources in parallel, but for some reason they do not.Keep in mind when you use
yarn watchto wait for the VS Code compilation. It looks like:If you access the browser before the compilation finishes, you will get an error about a missing file, because VS Code has not finished compiling yet. So if this happens just wait for the compilation before refreshing the window.
code-asher commentedon Jul 10, 2024
One thing you could try also, if you have to use
yarn build:vscode, is to set theMINIFYenvironment variable (set it to a blank string). This will cause code-server to runvscode-reh-web-linux-x64instead ofvscode-reh-web-linux-x64-min, which means it skips the minification which should be faster.bilogic commentedon Jul 11, 2024
Thanks, I will take up the long build times with vscode.
code-asher commentedon Jul 11, 2024
Awesome. I will close out the issue in the meantime, but if we do figure out something to speed up the time I would love to hear it.