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

Reload preloaded libraries only if there are new packages to load #9801

Merged
merged 1 commit into from
Jun 18, 2019

Conversation

aparajit-pratap
Copy link
Contributor

@aparajit-pratap aparajit-pratap commented Jun 18, 2019

Purpose

This is a small optimization to avoid having to reload all preloaded (out of the box) libraries (zero touch + DS files) IF there are no packages to be loaded.

The first time all preloaded libraries are loaded is during the instantiation of DynamoModel here:

ResetEngineInternal();
Next, when packages are loaded in the PackageManagerExtension here:
LoadPackages(startupParams.Preferences, startupParams.PathManager);
the VM is re-initialized, and all libraries (preloaded libraries + packages) are reloaded again (due to existing VM limitations). This happens even when there are no local packages to be loaded and is wasteful to do twice for preloaded libraries. The change here is to skip reloading preloaded libraries when there are no packages to load.

Declarations

Check these if you believe they are true

  • The code base is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning, and are documented in the API Changes document.

Reviewers

@mjkkirschner

FYIs

@QilongTang

@mjkkirschner mjkkirschner added the LGTM Looks good to me label Jun 18, 2019
@aparajit-pratap aparajit-pratap merged commit 8f3d530 into DynamoDS:master Jun 18, 2019
@aparajit-pratap aparajit-pratap deleted the fixPreload branch June 18, 2019 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM Looks good to me
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants