I have a JavaScript script in an Angular page that executes a promise chain as follows:
foo().then(() => {
console.profile("foo1");
...
return foo1();
}).then(() => {
console.profileEnd("foo1");
console.profile("foo2");
...
return foo2();
}).then(() => {
console.profileEnd("foo2");
console.profile("foo3");
...
return foo3();
})
...
I use console.profile
to find out which part of the promise chain takes so much time to execute. What I noticed is that one of the profilers (in my case foo6
) has a 350ms idle time. What is a good approach to find out why it is not executing anything although the promise chain has still not finished?
from How do I fix (idle) that shows up in the Chrome JavaScript Profiler?
No comments:
Post a Comment