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

Minimize activation function #2611

Merged
merged 2 commits into from
Dec 12, 2023
Merged

Conversation

rudyflores
Copy link
Contributor

@rudyflores rudyflores commented Dec 6, 2023

Proposed changes

Fixes #1985

Minimize Zowe Explorer activate() function to only run functions necessary for indirect actions. That way Zowe Explorer will only complete full activation of the direct actions if Zowe Explorer is opened (clicking on the Zowe icon in the activity bar for example)

What are direct/indirect actions in activation?

Indirect and Direct actions on Zowe Explorer is those that are used by extenders (indirect) and those that are used straight from the Zowe Explorer UI (direct).

Direct

  • tempPath
  • globals.defineGlobals
  • hideTempFolder
  • ProfilesUtils.initializeZoweTempFolder
  • SettingsConfig.standardizeSettings
  • globals.setActivated

Indirect

  • ZoweLogger.initializeZoweLogger
  • ZoweLocalStorage.initializeZoweLocalStorage
  • registerCredentialManager
  • ProfilesUtils.initializeZoweProfiles
  • Profiles.createInstance
  • PollDecorator.register
  • registerRefreshCommand
  • initializeSpoolProvider
  • TreeProviders.initializeProviders
  • registerCommonCommands
  • ZoweExplorerExtender.createInstance
  • watchConfigProfile
  • ZoweExplorerApiRegister.getInstance

Release Notes

Milestone: v3 Prereleases

Changelog: Minimized activation function in Zowe Explorer to load only certain actions when necessary

Types of changes

What types of changes does your code introduce to Zowe Explorer?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Updates to Documentation or Tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This checklist will be used as reference for both the contributor and the reviewer

  • I have read the CONTRIBUTOR GUIDANCE wiki
  • PR title follows Conventional Commits Guidelines
  • PR Description is included
  • gif or screenshot is included if visual changes are made
  • yarn workspace vscode-extension-for-zowe vscode:prepublish has been executed
  • All checks have passed (DCO, Jenkins and Code Coverage)
  • I have added unit test and it is passing
  • I have added integration test and it is passing
  • There is coverage for the code that I have added
  • I have tested it manually and there are no regressions found
  • I have added necessary documentation (if appropriate)
  • Any PR dependencies have been merged and published (if appropriate)

Further comments

@rudyflores rudyflores added this to the v3 pre-releases milestone Dec 6, 2023
@rudyflores rudyflores self-assigned this Dec 6, 2023
@rudyflores rudyflores changed the base branch from main to next December 6, 2023 21:16
Signed-off-by: Rudy Flores <[email protected]>
Copy link

sonarcloud bot commented Dec 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

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

Comparison is base (8571be2) 92.91% compared to head (71bee5e) 92.91%.

Files Patch % Lines
packages/zowe-explorer/src/shared/init.ts 92.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2611      +/-   ##
==========================================
- Coverage   92.91%   92.91%   -0.01%     
==========================================
  Files         109      109              
  Lines       10083    10093      +10     
  Branches     2107     2110       +3     
==========================================
+ Hits         9369     9378       +9     
- Misses        713      714       +1     
  Partials        1        1              

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

Copy link
Member

@traeok traeok left a comment

Choose a reason for hiding this comment

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

Thanks for these changes @rudyflores! This is a nice approach to reducing activation time.

Copy link
Contributor

@JillieBeanSim JillieBeanSim left a comment

Choose a reason for hiding this comment

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

LGTM! thanks @rudyflores for this refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Minimize the activate() function to have less chance of failure
3 participants