Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console warning "violation 'settimeout' handler took n ms" coming multiple times #434

Open
RjunH opened this issue Apr 22, 2024 · 0 comments

Comments

@RjunH
Copy link

RjunH commented Apr 22, 2024

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.

image

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.

@RjunH RjunH changed the title console warning "violation 'settimeout' handler took n ms" coming 2K+ times console warning "violation 'settimeout' handler took n ms" coming multiple times Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants