Javascript performance optimization?

Just wondering what the best tool is to really test JS scripts and see how to increase overall performance to the “maximum maximum” in terms of size and speed?

+3
source share
3 answers

I like to use Firebug profiler to improve overall speed. It will show you how many times each function is called, how much time it took to execute (average and total) and the percentage of the total JS runtime that the function performed. I am not a big fan of micro-optimization, so I do not use any tools to get the "maximum maximum" from my code, but the profiler helps get rid of big problems.

Regarding size, I use the YUI compressor to minimize the size of my JavaScript files. (There are other tools to minimize JavaScript, I'm just most used to YUI.)

+3
source

Safari 4, JavaScript Web Inspector.

JavaScript Packer Dean Edwards.

+1

I usually follow these steps.

  • Using JSLint - http://www.jslint.com/ optimize script.
    • Use a YUI compressor.
    • Profile script. See Firebug and YSlow.
0
source

All Articles