Signal-Windows icon indicating copy to clipboard operation
Signal-Windows copied to clipboard

switch to libphonenumber for country list and prefixes

Open Trolldemorted opened this issue 8 years ago • 1 comments
trafficstars

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.

Trolldemorted avatar Aug 09 '17 12:08 Trolldemorted

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.

golf1052 avatar Oct 15 '17 17:10 golf1052