Skip to content

perf: reduce packaged extension size

Tomas Vik requested to merge 287-reduce-packaged-extension-size into main

Yesterday, we faced a problem with uploading our extension to open-vsx. (#287 (closed) in <details> in the description).

When looking into the contents of the packaged extension I found out we are packaging documentation gifs. These gifs don't have to be included because we are referencing them with their raw GitLab URL, not relative paths.

e.g.

### Compare with master

You can see changes in your branch by comparing with `master` and see them on GitLab.

![_compare-with-master.gif](https://gitlab.com/gitlab-org/gitlab-vscode-extension/raw/main/src/assets/_compare-with-master.gif)

There is roughly 10 of these gifs (https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/tree/main/src/assets) and combined they are over 3MB.

They are all prefixed with _

package size
Before this change 11.0 MB
After this change 8.8 MB

I tested that only the _ prefixed images are missing from the new package:

/usr/bin/diff -u <(ls this-project/src/assets/) <(ls unpacked-extension/src/assets/)        ✘ 1 
--- /dev/fd/12	2020-12-17 09:57:54.000000000 +0100
+++ /dev/fd/13	2020-12-17 09:57:54.000000000 +0100
@@ -1,12 +1,3 @@
-_advanced-search.gif
-_compare-with-master.gif
-_create-snippet.gif
-_issues-in-vscode.png
-_open_active_file.gif
-_pipeline_actions.gif
-_sidebar.gif
-_status-bar.gif
-_validate-ci-config.gif
 gitlab-logo.png
 gitlab-vscode.png
 images

Related to #287 (closed)

Merge request reports