mlandauer / thats-camping-elm

Find campsites near you
https://thatscamping.org
GNU General Public License v3.0
5 stars 1 forks source link

Adding new campsite with lots of loaded campsites is slow... #79

Closed mlandauer closed 7 years ago

mlandauer commented 7 years ago

No surprises there. It's easy to see that this is happening by just watching the changes from the local database being sent to the app and things slow down as more and more campsites are added.

We've done the obvious view optimisation to use Html.keyed so the likely culprit is the sorting. I wonder if there's a quick optimisation we can do to speed this up. However, before we do that we should add some performance testing for this case.

mlandauer commented 7 years ago

Using the Chrome profiler over the initial load of data from the local database it looks like the Campsite.shortenName function is taking up 43% of the cpu time.