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

Do not call getAllComponents() in activate #3880

Conversation

datho7561
Copy link
Collaborator

Part of #3850

Signed-off-by: David Thompson davthomp@redhat.com

Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Attention: 48 lines in your changes are missing coverage. Please review.

Comparison is base (da60441) 32.37% compared to head (09c4ab5) 45.40%.
Report is 23 commits behind head on main.

Files Patch % Lines
src/openshift/cluster.ts 18.75% 26 Missing ⚠️
.../webview/create-component/createComponentLoader.ts 36.36% 7 Missing ⚠️
src/registriesView.ts 78.26% 5 Missing ⚠️
src/util/loginUtil.ts 44.44% 5 Missing ⚠️
src/webview/devfile-registry/registryViewLoader.ts 57.14% 3 Missing ⚠️
src/webview/common-ext/createComponentHelpers.ts 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3880       +/-   ##
===========================================
+ Coverage   32.37%   45.40%   +13.03%     
===========================================
  Files          85       85               
  Lines        6505     6488       -17     
  Branches     1349     1342        -7     
===========================================
+ Hits         2106     2946      +840     
+ Misses       4399     3542      -857     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change it looks like the Component View gets loaded significantly faster, but...
the Devfile Registries list doesn't get initialized on ComponentTypesView so the Devfile Registry Editor, when opened for a registry, is completely empty:

image

@datho7561 datho7561 force-pushed the speedup-startup-avoid-get-all-components branch 2 times, most recently from 9ae98bd to 7b19597 Compare February 6, 2024 21:19
Part of redhat-developer#3850

Signed-off-by: David Thompson <davthomp@redhat.com>
@datho7561 datho7561 force-pushed the speedup-startup-avoid-get-all-components branch from 7b19597 to 09c4ab5 Compare February 6, 2024 21:34
@datho7561
Copy link
Collaborator Author

Good catch! I fixed this issue, and refactored the code related to collecting the list of Devfiles.

@datho7561
Copy link
Collaborator Author

Serverless function tests are failing for me. The root causes could be that something is preventing the refresh button from being pressed, or that VS Code reports it has run out of filesystem watchers during the tests.

Copy link
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - Devfile Registry editing works fine and GH Actions tests are passed.
Thanks!

@datho7561 datho7561 self-assigned this Feb 7, 2024
@datho7561 datho7561 added this to the 1.12.0 milestone Feb 7, 2024
@datho7561 datho7561 merged commit 92f60b5 into redhat-developer:main Feb 7, 2024
6 checks passed
@datho7561 datho7561 deleted the speedup-startup-avoid-get-all-components branch February 7, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants