Skip to content
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

Extension is slow to activate #4226

Open
fbricon opened this issue Jun 26, 2024 · 4 comments · Fixed by #4256 · May be fixed by #4584
Open

Extension is slow to activate #4226

fbricon opened this issue Jun 26, 2024 · 4 comments · Fixed by #4256 · May be fixed by #4584
Assignees
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Jun 26, 2024

OpenShift toolkit is the slowest of all the extensions I have installed. Taking between 300ms and almost 900ms to activate, on my MBP Pro M3.
Screenshot 2024-06-26 at 17 28 35

@mohitsuman
Copy link
Collaborator

We need to look at the events getting activated together when making calls odo to load the view. Also relates to #3850

@mohitsuman
Copy link
Collaborator

@datho7561 @vrubezhny @msivasubramaniaan maybe we need to load each view separately instead of loading all at once.

@mohitsuman mohitsuman added this to the 1.16.0 milestone Jun 27, 2024
@mohitsuman mohitsuman moved this to 📋 Backlog in IDE Cloudaptors Jun 27, 2024
@vrubezhny vrubezhny self-assigned this Jul 3, 2024
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 3, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes funcion 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a nomerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 3, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
@vrubezhny vrubezhny moved this from 📋 Backlog to 👀 In review in IDE Cloudaptors Jul 3, 2024
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 4, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 4, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Issue: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
@vrubezhny vrubezhny modified the milestones: 1.16.0, 1.15.0 Jul 4, 2024
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Jul 4, 2024
The PR adds some optimization to the extension activation.

Also, the PR removes function 'migrateFromOdo018' which looks over outdated and doesn't make its
work properly after a numerous changes in ODO. See: redhat-developer#4255

Fixes: redhat-developer#4255
Fixes: redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in IDE Cloudaptors Jul 5, 2024
@vrubezhny
Copy link
Contributor

vrubezhny commented Jul 5, 2024

@fbricon Could you please give it a try once again (using the main branch or by installing a VSIX built from the main branch)?

Feel free to reopen the issue in case it's still too slow on activate. Thanks!

@fbricon
Copy link
Contributor Author

fbricon commented Jul 8, 2024

Running from main, the bundled extension is still quite slow to activate (from 300ms to 1000ms)
Screenshot 2024-07-08 at 15 13 05

One potential hint is this message when running npx @vscode/vsce package:

This extension consists of 10353 files, out of which 4900 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore
DONE Packaged: /Users/fbricon/Dev/projects/vscode-openshift-tools/vscode-openshift-connector-1.14.0.vsix (10353 files, 170.21MB)

Indeed, the zip contains a shitload of .js files, that we should bundle with webpack or eslint:

Screenshot 2024-07-08 at 15 17 32

@fbricon fbricon reopened this Jul 8, 2024
@vrubezhny vrubezhny modified the milestones: 1.15.0, 1.16.0 Jul 9, 2024
@vrubezhny vrubezhny removed the status in IDE Cloudaptors Jul 17, 2024
@rgrunber rgrunber moved this to 🏗 In progress in IDE Cloudaptors Jul 19, 2024
@vrubezhny vrubezhny moved this from 🏗 In progress to 📋 Backlog in IDE Cloudaptors Aug 7, 2024
@vrubezhny vrubezhny removed this from the 1.16.0 milestone Aug 29, 2024
@vrubezhny vrubezhny added this to the 1.17.0 milestone Aug 29, 2024
@vrubezhny vrubezhny moved this from 📋 Backlog to 📝 In Progress in IDE Cloudaptors Sep 25, 2024
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Nov 14, 2024
This fix makes 'esbuild' to produce the bundled and minified VSIX extension archive,
free of unneeded dependency modules, when it's started with

```
vsce package
```

On other hand, when building with `npm install && npm run build` and testing with
`npm test` the extension file structure is kept unchange and the trunspiled scripts not
minified, so the unit testing and coverage tests can work as usual.

Note: `npm install` is needed to be executed after `vsce package` is executed as the last one
clears the `node_modules/` of the depencencies not needed in production.

Fixes redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Nov 14, 2024
This fix makes 'esbuild' to produce the bundled and minified VSIX extension archive,
free of unneeded dependency modules, when the packaging is started with `vsce package`.

On other hand, when building with `npm install && npm run build` and testing with `npm test`
the extension file structure is kept unchange and the trunspiled scripts aren't minified,
so the unit testing and coverage tests work as usual.

Note: `npm install` is needed to be executed after executing `vsce package` as the last one
clears the `node_modules/` of the depencencies not needed in production.

Fixes redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
@vrubezhny vrubezhny linked a pull request Nov 14, 2024 that will close this issue
vrubezhny added a commit to vrubezhny/vscode-openshift-tools that referenced this issue Nov 15, 2024
This fix makes 'esbuild' to produce the bundled and minified VSIX extension archive,
free of unneeded dependency modules, when the packaging is started with `vsce package`.

On other hand, when building with `npm install && npm run build` and testing with `npm test`
the extension file structure is kept unchange and the trunspiled scripts aren't minified,
so the unit testing and coverage tests work as usual.

Note: `npm install` is needed to be executed after executing `vsce package` as the last one
clears the `node_modules/` of the depencencies not needed in production.

Fixes redhat-developer#4226

Signed-off-by: Victor Rubezhny <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📝 In Progress
3 participants