ibhhvc
ibhhvc

Reputation: 265

How to measure JavaScript performance (aside from page load time)

There seem to be a lot of tools to check how much time it takes to load a specific script, but what about performance impact on the user's machine? Does anyone know of any tools to see the CPU demands of a specific script, especially on mobile?

As I write apps, I feel like I'm trying my best to cut down on unnecessary logic, but I have a hard time knowing how I'm doing — and whether the end user's experience will be smooth — with no CPU benchmarks or guidelines.

Upvotes: 2

Views: 237

Answers (2)

IBelous
IBelous

Reputation: 80

You can simply use profiling browser tools (like in Firefox right click-> Inspect element and choose performance tab).

Or you can measure your functions performance by using High Resolution Time API

Upvotes: 0

Miquel Adell
Miquel Adell

Reputation: 1162

There are some tools out there but if you are using chrome you already have a great one installed: https://developer.chrome.com/devtools/docs/timeline

Upvotes: 2

Related Questions