-
Notifications
You must be signed in to change notification settings - Fork 297
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
Investigate reducing bundle size #11996
Comments
All the module does is replace ~ with os.homedir(). This change won't reduce bundle size particularly but it simplifies dependencies. Part of #11996
uglify-js doesn't appear to be in the project anymore and it seems that was the only reason it was included based on a comment? Regardless, support is good for named capture group in all browsers/node now. Part of #11996
Support for URL is good in all environments, it was actually only being referenced directly in .node.ts files and it's been available in node since v10. The package itself also has deprecated url.parse with advice to use the standard API instead. It is still imported in tests only via rewiremock. Part of #11996
A profile when Jupyter activates is interesting, this is on a particularly fast activation (1s) on my fast machine but it's typically around 2-2.5s:
|
This should be in the Python extension, they end up spawning Python processes (its part of discovering python environments on the user machine). & I believe they do end up reading registry keys (at least at one point they did), Again this is a delay in the Python extension. |
Once Jupyter switches to the new kernel picker, I believe 'refreshEnvironments' need not be called at startup, so this shouldn't be an issue. And yes we do block it on fetching registry keys atm, but asynchronously. |
@karrtikr the profiler shows it's blocking the exthost thread, I'm guessing it's an Electron/Windows thing? |
I think it's a NodeJS thing. Even though it runs in background, practically it seems to be occupying so much clock that it blocks the single threaded node. |
based on my knowledge yes this is known , there's a certain part in spawn that is blocking, hence my suggestion to use a node worker, because then the main thread is not blocked at all. |
Support for URL is good in all environments, it was actually only being referenced directly in .node.ts files and it's been available in node since v10. The package itself also has deprecated url.parse with advice to use the standard API instead. It is still imported in tests only via rewiremock. Part of #11996 Co-authored-by: Peng Lyu <penn.lv@gmail.com>
This module was a polyfill which is now well supported so it should be safe to remove it. Part of #11996
This upgrades the node/web packages to use es2020 and downgrades the webviews bundle from esnext because that target changes over time. Part of #11996
It would be great if we could remove this dependency as it modifies global state. Part of #11996
* Explicitly state computeHash type * Remove msrCrypto in favor of native APIs msrCrypto is a polyfill for the native APIs which are well supported in browser and node currently. The module also recommends using native APIs when they are available. Fixes #12023 Part of #11996 * Fix compile issue in webTestReporter.js * Mark node:crypto as an external * require reflect-metadata in smoke tests earlier
* Explicitly state computeHash type * Remove msrCrypto in favor of native APIs msrCrypto is a polyfill for the native APIs which are well supported in browser and node currently. The module also recommends using native APIs when they are available. Fixes #12023 Part of #11996 * Fix compile issue in webTestReporter.js * Mark node:crypto as an external * Introduce a tsconfig.base.json * Move extension tsconfigs into src and extend base * Simplify tsconfig excludes * require reflect-metadata in smoke tests earlier * Fix types in helper.ts when allowJs is removed * Remove allowJs! * Remove unneeded cast
* Explicitly state computeHash type * Remove msrCrypto in favor of native APIs msrCrypto is a polyfill for the native APIs which are well supported in browser and node currently. The module also recommends using native APIs when they are available. Fixes #12023 Part of #11996 * Fix compile issue in webTestReporter.js * Mark node:crypto as an external * Introduce a tsconfig.base.json * Move extension tsconfigs into src and extend base * Simplify tsconfig excludes * require reflect-metadata in smoke tests earlier * Fix types in helper.ts when allowJs is removed * Remove allowJs! * Remove unneeded cast * Support comments in tsconfig telemetry parsing * Dynamic import extension-telemetry module * Add webpack-analyze:node|web npm scripts * Fix node build LinkedMap was removed as tsc was outputting invalid js where the variable map_c was not defined but was used. * Dynamic import svg-to-pdfkit * Skip tests when packaging * Use import for global requires like reflect-metadata * Use commonjs2 again * Remove unneeded webpack resolves in web bundle * Remove resolves in web * Revert "Remove resolves in web" This reverts commit 78a061c. * Dynamic import tcp-port-used * Dynamic import portfinder * Switch back to require for reflect-metadata It may have been already run by another extension in which case it would get clobbered * Move require of reflect metadata to own module This consolidates the any/eslint override/docs in a single file * Fix compile errors in telemetryGenerator.node.ts * Revert "Fix compile errors in telemetryGenerator.node.ts" This reverts commit b6fc84b. * Generate telemetry.csv on mac * Fix lint errors * Fix telemetry test rewiremock usage * Add telemetry reporter is supported check back * Bring back os fallback
~Closing this for now.` We have a few issues for reducing the bundle size:
Once we address the above and find a few more, I think then we can close this. |
Closing as done, we can remove portfinder separately (there's an issue for that) |
No description provided.
The text was updated successfully, but these errors were encountered: