I’m in the process of writing a jQuery plugin, and am getting into some fairly heavy operations, which is making my plugin slower and less responsive. I was wondering if there was any tools out there that would help me optimize my JavaScript?
Share
I recommend using Firebug’s “profile” tab as a start.
Just click the profile tab, then use your plugin for a while and then click the profile tab again. You’ll then see a report of what functions were called and how much time each one took.
Then, I recommend the article Speed up your JavaScript
As outlined in the article, why a script can take too long to execute
I have not yet found a tool that automatically optimizes or refactors JavaScript for speed. It’s always been a manual process for me.