Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Eichorn's Blog:
Improving JPSpan (XMLHttpRequest) Performance
Apr 25, 2005 @ 12:57:49

In keeping up with his adventures in "AJAX Land" (with his sidekick XMLHttpRequest by his side) and the JPSpan library, Joshua Eichorn has a new posting on his blog today - Improving JPSpan Performance with an Object Pool.

Some people commented in my AJAX Hello World with JPSpan article that the JPSpan example app was quite a bit slower. After a bit of testing it does seem that the performance problems comes from each JPSpan object having only 1 XMLHttpRequest object, this means if you use 1 object you can only have 1 outstanding call.

I would like to see this fixed with an pool of XMLHttpRequest objects at the JPSpan level, however im sure this will take some time so I have a solution for you today. Its a small javascript class (objectPool.js) that implements a simple autogrowing object pool for the create JPSpan remoting objects.

He gives an example with this new functionality, allowing an autogrowing object pool of JPSpan objects to exist all at once. He includes the full source for the new "Hello World" app, and as well as examples of the old version as compared to the updated version.

tagged:

Link:


Trending Topics: