flyingrub / TamTime

Display the shedule of Montpellier's transport [Android]
GNU General Public License v2.0
7 stars 2 forks source link

Stop search suggestions slow to load at startup #24

Closed Fallstar closed 6 years ago

Fallstar commented 8 years ago

When you start the app and try to search from the home screen, the list takes a few seconds to load. (Reported by Meta)

flyingrub commented 8 years ago

https://github.com/flyingrub/TamTime/blob/master/app/src/main/java/flying/grub/tamtime/data/datahandler/TamMap.java#L168

The code is here. What it do : 1) it set the normalised name (without maj and special char) if the normalised name isn't already set. 2) compare it with the search word.

The firsts searchs are a little slow because of that. But the more you search, the faster it become.

flyingrub commented 8 years ago

https://github.com/flyingrub/TamTime/commit/e4ab09766ba6a6b80ac65101630b57608974abb8 could speed things a bit.