I have an android app that fetches a list of about 100 Items.
Trying to get the server load down, I’ve built a filtering feature that
does everything offline, so basically instead of calling the server (and thus a MySQL query every call)
It filters on its own.
However I’ve noticed the app tends to lag (while the only change is the offline filtering).
Is the processing of relatively big object-lists something that should be done offline or should I live the load on the server ?
2
You cannot know where your problem is unless you profile. Is the lag in the data connection (100 records over mobile might be a slow, the processing at the app, or is the server takling longer to get the data?
If a 100 item list is bogging down the server, I think you might have bigger problems to solve than off loading the filtering work to the devices will help with…… Did you profile the server before you optimized? Perhaps the server is having problems with Bandwidth to the devices – this would make you optimized code have less performance.
As an aside to the original question, I find it hard to believe that there benefit to anyone having a typical Android device do the filtering. The server is sending way more data to the devices than needed, the devices are handling way more data than the need to, and way more data is being sent over the networks. If these are mobile networks, that are often slow, and in some countries, data is expensive. In all countries when roaming, data charges are criminal.
3