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

switch to libphonenumber for country list and prefixes #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Trolldemorted
Copy link
Contributor

libphonenumber has some support for listing supported countries/regions, but this PR has ugly problems:

  • the performance is hideous. When constructing the RegisterPageViewModel, S-W stalls for several seconds
  • the country list is ordered by the country code and not name, and thus appears unordered. Manually ordering would make the performance even worse

Though i am not sure if the country arrays in Utils have a similar performance impact which hits during startup and thus is not directly noticeable. We could speed up things by building the lists in parallel with multiple worker tasks on startup, but i am not sure how that will work out on weak machines.

@golf1052
Copy link
Member

Is it the call to PhoneNumberUtil.GetInstance() which causes the perf hit? If so yeah I think we should load it on startup. I can always test it on my phone which should be a pretty good stand in for a less powerful machine.

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