Scrolled method loadMoreUsers() is being used to make a API call with pagination on each scroll.
Big chunk of data being fetched from the API. APIs response time is within 800ms.
On each scrolled method call, 50+ records are being concatenated to existing array and issue starts after 10-12 times (pages) scroll.
Time taken to complete the loadMoreUsers() method is increasing exponentially on each scroll method call.
Also as observed execution is getting stalled and console warnings are coming multiples times, saying "violation 'settimeout' handler took n ms"
Also number of setTimout calls getting increased with each scrolled method call.
Any help or direction to resolve this issue would be appreciated.
Angular Version: 16 "ngx-infinite-scroll": "16.0.0"
<div infiniteScroll
[scrollWindow]="false"
[infiniteScrollDistance]="1.5"
[infiniteScrollThrottle]="250"
(scrolled)="loadMoreUsers()"
>
Scrolled method
loadMoreUsers()
is being used to make a API call with pagination on each scroll. Big chunk of data being fetched from the API. APIs response time is within 800ms.On each scrolled method call, 50+ records are being concatenated to existing array and issue starts after 10-12 times (pages) scroll.
Time taken to complete the
loadMoreUsers()
method is increasing exponentially on each scroll method call. Also as observed execution is getting stalled and console warnings are coming multiples times, saying"violation 'settimeout' handler took n ms"
Also number of setTimout calls getting increased with each scrolled method call.
Any help or direction to resolve this issue would be appreciated.