Site Moved

This site has been moved to a new location - Bin-Blog. All new post will appear at the new location.


Optimizing JavaScript for Speed

One of the most often heard complaints about javascript is that it is very slow. The arrival of very complex but extremely cool web programming methods like ajax, javascript has become a sharp weapon in a web developers tool box - but the extreme amount of processing required for ajax and the slow execution of javascript has dulled this tool very much. I have seen computers crash when gmail is opened in the browser - lower end computers just cannot handle that much processing. But still javascript cannot be ignored - this is where javascript optimization comes in.

Andy King have written an excellent article on Optimizing JavaScript For Execution Speed. I would highly recommend it if you are serious about javascript programming.

From the article...
Unlike other programming languages, JavaScript manipulates web pages through a relatively sluggish API, the DOM. Interacting with the DOM is almost always more expensive than straight computations. After choosing the right algorithm and data structure and refactoring, your next consideration should be minimizing DOM interaction and I/O operations.
There are other articles on this subject, but I like this one the best.
Technorati Tags: Tags :