I’ve been using infinite scroll component from ionic. This is my situation : I have search field and below it is infinite scroll which shows 1st 20 records. After user changes search input infinite scroll resets with that for records that only match that search input (e.g only records that start with ‘Ae’). I’ve done this by fetching all data from backend initially and then using array functions like filter to change what is displayed in infinite scroll. This all work very well when there are not too much records in database (around 150 from what i tested) but as i think application will grow i think i will have more records than that and i tried with 1000 records, time for loading the page is drastically changing and when i test on phone it loads forever.
Idk can somebody experienced point me in right direction, i just need the patter to use i will do reasearch on it myself, i just dont know what is best practice and what will not stress my app so much when there are too many records in databse. Thanks!