DEV Community

Discussion on: Performance measuring

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

The best way to do this is to use the Performance Observer API.

By accident i was writing almost exactly the same code today, but didnt see Observer API in MDN, why is it the best way to do it?

Collapse
 
victormagarlamov profile image
Victor Magarlamov

Because WebAPI's observers do they work in own thread, asynchronously.

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

Ouh, i just did setTimeout 100 and it worked out cool ;)