-
Notifications
You must be signed in to change notification settings - Fork 338
Closed
Labels
debtCode quality issuesCode quality issues
Description
Currently the unzipped bundle size for Web bits is 4.67MB. Considering that the web extension doesn't support bundle splitting, a large bundle file means long download and evaluation (activation).
There have been quite some good efforts to reduce the bundle size. We can follow the same patterns and also leverage the eslint rules to ensure that we don't overlook them in the future. From a 10000 feet bird view, we can do at least following to bring down the bundle size noticeably:
- Load lodash function modules only Avoid loading full lodash #10308
- Mark
moment.js
as external as it's not used by us, orjupyterlab
sub-components we depend on -
semver
is used for Python intepreter and Python extension versions check, we probably don't need this in Web. If so, make sure we are not referecingsemver
in Web related code paths -
hash
. We usesha1
,sha256
,sha512
only, no need to reference them all. Also we can validate if we need all three sha algorithms. -
fnv
. Originally introduced for A/B testing in Python db297c4. The code sets the default algorithm tofnv
and now it's used as default way to generate file hash https://github.com/microsoft/vscode-jupyter/blob/main/src/kernels/jupyter/preferredRemoteKernelIdProvider.ts#L55- To move off
fnv
, we would need a migration plan to move fromfnv
to simpler hashes assha512
.
- To move off
- External/Ideas
- Load sub modules from
jupyterlab/services
instead of the whole bundle - Replace
url-parse
with inhousevscode.Uri.parse
- Load sub modules from
Metadata
Metadata
Assignees
Labels
debtCode quality issuesCode quality issues