Welcome to WebmasterWorld Guest from

Forum Moderators: open

testing .js load and performance


4:38 am on Jun 29, 2009 (gmt 0)

5+ Year Member

I recently contracted with a freelancer to build a heavy javascript based application (it involves video and jQuery) and in the end it worked as specified but was sluggish. I was speaking to another programmer that I have a lot of confidence in based on other projects about an enhancement and he "politely" communicated that the previous programming resulted in a huge .js load.

I have since had the second programmer rebuild the project.

Is their any utility or way that I can test the load or performance on the old version versus the new?

thanks very much...


2:11 pm on Jun 30, 2009 (gmt 0)

10+ Year Member

Does the rebuilt project at least _feel_ faster?

"heavy javascript load" can mean that there are numerous, independent calls to the server to fetch many scripts, there is a lot of document manipulation causing a CPU slowdown, or there is just a boat load of javascript to compile, also causing a cpu slowdown.

Look into the Firebug plugin for Firefox for network performance monitoring. For jQuery and other libraries, you may be able to mash the scripts together into a single http call. For size, there are tools that compress the code for you, removing extra whitespace and comments.

For compile/run performance, I imagine slipping in a start time as a global variable inline in a script and then subtracting that time from the finish time as the very last thing that happens at the bottom of document load would give you an idea of time it took to execute. Wrap both versions of your page in this timer, and compare the results. Be sure to run it several times.

4:22 pm on Jun 30, 2009 (gmt 0)

5+ Year Member

Thank you, the idea to measure the start and stop time seems like the way to go.

i'm surprised their is not something like a "speedtest.net" for this time of measurement. it would be nice to just point to the "measurement url" and click.



4:53 pm on Jun 30, 2009 (gmt 0)

10+ Year Member

Well, recall that what you're measuring is all client-side. It's an interesting idea, and my experience shows that if I have thought of something, then it must already exist!

What you would be looking for is, effectively, a site set up to accept a url that will hand that url to a browser running on it that could easily detect page-load start time but must have some way of detecting "the page is finished" time. Then, it should be set up to report back for multiple browsers on multiple desktop configs (varying cpu speed, operating system..).

It's clever. It sounds similar to browsershots, and maybe browsershots does that kind of performance benchmarking as well?

9:02 pm on Jun 30, 2009 (gmt 0)

5+ Year Member

Love the browsershots analogy. Difference of course would be one browser and different cpu's. Results could be compared against a benchmarch, industry standards etc and you have a fantastic tool.

i'm sure that one of the other web performance monitoring sites might include this (Gomez, Watchmouse etc), but I'd use a ondemand version....



Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month