Skip to content

Removed OptimizelyConfig creation from SDK initialization to reduce intialization time #704

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

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

zashraf1985
Copy link
Contributor

@zashraf1985 zashraf1985 commented Sep 18, 2021

Summary

OptimizelyConfig object is created during initialization of Optimizely Instance. This almost doubles the initialization time for the SDK. This PR moves the creation of OptimizelyConfig object to getOptimizelyConfig. The OptimizelyConfig object will be created and cached when the getOptimizelyConfig API is called for the first time after every data file update.

Test plan

  • Manually tested thoroughly
  • Updated unit tests
  • All FSC test pass

@zashraf1985 zashraf1985 changed the title Moved OptimizelyConfig generation from initialization to getter Removed OptimizelyConfig creation from SDK initialization to reduce intialization time Sep 18, 2021
@zashraf1985 zashraf1985 removed their assignment Sep 18, 2021
@zashraf1985 zashraf1985 marked this pull request as ready for review September 18, 2021 18:26
@zashraf1985 zashraf1985 requested a review from a team as a code owner September 18, 2021 18:26
Copy link
Contributor

@yavorona yavorona left a comment

Choose a reason for hiding this comment

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

Great observation! It looks like it could be a great improvement in other sdks as well.

@zashraf1985 zashraf1985 merged commit f33af13 into master Sep 20, 2021
@zashraf1985 zashraf1985 deleted the zeeshan/init-optimization branch September 20, 2021 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants