Try wrapping potentially slow code like this:
performance.mark('costlyFunction Start') costlyFunction() performance.mark('costlyFunction End') performance.measure( 'costlyFunction', 'costlyFunction Start', 'costlyFunction End' )
💡 Tip: You can do much more with DevTools & the User Timing API:
The ModernDevTools.com course covers all of this 🎊 and videos on these topics have been released!
There's already 50 minutes worth of video content on these topics alone and there's much more to come. I've worked hard to make information digestible. Go and check out the course! Thank you for your support.