Skip to content

What I learned this week: What’s the deal with front-end performance?

This week and last week, I’ve been working with folk to add front-end performance logging to the app we’re working on. What’s the deal with front-end performance?

My 3 point summary of tracking performance:

  • There’s a W3C API for performance (yay!)
  • Time is a tricky thing (it’s it always). See the first link for more on that
  • Performance definitely doesn’t have to end with your server logs

and there’re a few links my good buddy John alerted me to:

And a final tidbit – if you’re logging performance to an external service, you gotta make sure the load event had fired and finished, otherwise some performance metrics will be undefined. The setTimeout trick to win:

window.addEventListener('load', function(){
  setTimeout(function() {
    myLoggingFunction('Log some data', somePerformanceDataObject);
  }, 0);
});

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.