I have a problem. How big or small I don’t know yet.
I create a form where the user must select a railway station. The station is selected by:
- Special code
- The name of the station
- the Route of the train (abbreviation in the form of three characters)
- The region in which the station is
For these purposes, the most appropriate (in my opinion) was an autocomplete input, in which the user enters data at their own discretion from the above points, and then selects an option from the ones offered in the request. I have configured this functionality and it works exactly as planned. But there is a PROBLEM:
The number of stations is 12 364. And when the user starts typing something in input, the page freezes. I first thought that my keyboard turns off when I take this input into focus. But then I realized that the problem is that the page freezes due to the fact that the processed request for a single character entered is simply huge. This was confirmed when I waited about two minutes for my text to appear in the input and thousands of options were offered to choose from to fill in.
Who has experienced this and how did you solve this problem? I will be grateful for any feedback or suggestions.
Last updated: