I am planning to build a location-aware app with the Ionic framework. It basically comes down to showing a Google map with the location of the user and markers in his neighbourhood. I will only show markers on the visible part of the map.
This excellent tutorial of Josh Morony uses a PHP script on the database. It limits the number of markers returned to the app based on a distance calculation between the user location and all markers stored in a mysql database.
However, I would like to use a Firebase database for my app. This question already points out that server-side calculations are not possible with Firebase.
Would it harm the performance of my app if I would return all markers stored in Firebase and calculate the distance on the client side? I would then limit the markers shown based on those calculations.
Or is it better to limit the number of markers returned after server-side calculations and then load the Google Map Markers?