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

feat: add option to enable or disable asset flag preload #237

Closed
wants to merge 1 commit into from

Conversation

kleytonstn
Copy link

This change offers the option of lazy loading for scenarios where upfront asset download isn't necessary or detrimental to the performance of the page.

@cedvdb
Copy link
Owner

cedvdb commented Apr 4, 2024

Can you elaborate on when and how this is detrimental ?

@kleytonstn
Copy link
Author

Can you elaborate on when and how this is detrimental ?

Use case: a web page where other requests are being made at the same time, loading all the assets concurrently is not good for performance, it's better to let the developer decide the approach.

@cedvdb
Copy link
Owner

cedvdb commented Apr 4, 2024

Use case: a web page where other requests are being made at the same time, loading all the assets concurrently is not good for performance, it's better to let the developer decide the approach.

  1. This seems like a good addition for people not using HTTP 2.
  2. It would be better if this was added to the CountrySelector library as it would benefit there as well.
  3. Tests are missing, since this adds to the public api, tests are needed. It's a bit unclear how this can be achieved since the preload method is static. Maybe by checking if any superfluous request is made.

@cedvdb
Copy link
Owner

cedvdb commented May 21, 2024

Flags are now disabled by default, Use PhoneFormField.preloadFlags() to preload

@cedvdb cedvdb closed this May 21, 2024
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