Skip to content

Startup optimisation - #1210

Merged
stephenhand merged 2 commits into
masterfrom
SJH-startup_optimisation
Jan 31, 2023
Merged

stephenhand merged 2 commits into
masterfrom
SJH-startup_optimisation

Conversation

@stephenhand

@stephenhand stephenhand commented Jan 30, 2023 •

Copy link
Copy Markdown
Collaborator

Description

By default, Flex waits for 10 seconds (!) between initialising plugins and attempting to render anything. An undocumented setting in the pluginService section of the app.config allows this to be adjusted.

Since our startup routine should be robust and not require a blanket delay to work around race hazards like that, I tried setting the delay to 1 millisecond and was gratified to see the startup sequence still appears to work fine.

There might be a more elegant way to handle this, a way in the API to inform the plugin loading system that initialization is complete and rendering can commence, but I haven't seen anything - I've asked Twilio: https://console.twilio.com/us1/support/tickets?frameUrl=%2Fconsole%2Fsupport%2Ftickets%2F11040527%3F__override_layout__%3Dembed%26bifrost%3Dtrue%26x-target-region%3Dus1

  • Sets 'initializationTimeout' to 1 millisecond in deployment app.config

NOTE: This will only affect deployment configs, to tesst locally you need to add the same attribute to your local public/app.config

Checklist

  • Corresponding issue has been opened
  • New tests added
  • Feature flags added
  • N/A Strings are localized
  • Tested for chat contacts
  • Tested for call contacts

Related Issues

Fixes #....

Verification steps

  • Update app.config & start Flex

@gpaoloni gpaoloni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome finding, using it locally already. Thank you!

@murilovmachado murilovmachado left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this will make things run MUCH faster, thanks!

@stephenhand
stephenhand merged commit 81dc272 into master Jan 31, 2023
@stephenhand
stephenhand deleted the SJH-startup_optimisation branch January 31, 2023 08:32
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.

3 participants