high loading time on low performance smartphones
Opened this issue · 4 comments
Hi there,
I just noticed that on low end smartphones (or old smartphones), the load time in the checkout selection fields is very big.
I think this is caused by the loading of all the states and cities in the js selector on page load.
Is there a way to make it selective?
eg. select state 1, load just cities A1-Z1;
select state 2, load just cities A2-Z2.
Also, due to this very high load time, if the user clicks the field and accidently types something (the keyboard is not shown ini this state, but android takes the input anyway) and writes something in the field, it will break the selector completely.
Thank you, cheers!
hi, is this a problem with any country or specifically with Romania?
I think it currently does what you mentioned. It only puts the cities into the select when a state is selected.
Maybe disabling the select2 JS library, the performance can be improved...
@Mantish it's for any country.
You can have a look here, this one loads cities when the state is selected, it's better to wait at most 1 second for loading, compared to loading all cities on state select.
Hey, I'm not sure I understand what the problem is.
This plugin only loads the cities that belong to the state selected. Isn't that what you'd want?
Yes, then I think there is something else wrong.
Steps to replicate:
- launch a vm (low spec) with an android OR use a low-end smartphone (I used Samsung Galaxy J7 2017)
- go to the checkout on a basic WooCommerce installation
- as soon as you have the page loaded try to select a state/city
It will show you the keyboard and allow you to input, but it will not load the dropdown for another few seconds (from my measurements around 5-6 seconds). IF the user inputs anything in the field, it will break the selector and won't load the list anymore.