homepage Welcome to WebmasterWorld Guest from 54.211.68.132
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
testing .js load and performance
load
infante

5+ Year Member



 
Msg#: 3942240 posted 4:38 am on Jun 29, 2009 (gmt 0)

Hi,
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...

rg

 

broniusm

10+ Year Member



 
Msg#: 3942240 posted 2:11 pm on Jun 30, 2009 (gmt 0)

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.

infante

5+ Year Member



 
Msg#: 3942240 posted 4:22 pm on Jun 30, 2009 (gmt 0)

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.

best,

rg

broniusm

10+ Year Member



 
Msg#: 3942240 posted 4:53 pm on Jun 30, 2009 (gmt 0)

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?

infante

5+ Year Member



 
Msg#: 3942240 posted 9:02 pm on Jun 30, 2009 (gmt 0)

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....

rg

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved