Wich is the best approach for an app that aims to filter data, like 5000+ records, by keeping the response speed in focus?
A) Filter local memory arrays B) Query to db trought http api request calls
For my app i use angularjs, php and SQLite3. Right now i load all record from slite db to my table and then filter this field by search. All work great, but when I exceed 3000 records I notice a certain slowing down. By limiting the search on two fields, I get better performance. My doubt is if changing the model and querying the db I get a better performance or not.
A) Local array advantages - i can use JavaScript Array map() Method - low consuming data bandwidht - i can see all records in table before filter - i can work, after loading data, in offline.
A) Local array disadvantages - slowing down performance over 2000 record.
So can you help me to evaluate advantages and disavantages if i make http api call for any filter action request keeping in focus the performances?
Thank You