I am trying to improve my INP. As I am checking the performance panel and notice there is a function takes a very long time to complete, while itself only consumes 0.41ms, and in the timeline chart, the function is doing nothing.

Why it takes so long just to wait? And why this period is not considered "idle"?

Can somebody explain? Thanks!

enter image description here

update:

May I know which one should I choose?

enter image description here

0

There are 0 best solutions below