Digital Edition

SYS-CON.TV
Endless Loop in JavaScript Makes Masters.com Site Unresponsive
How to spot the problem in a minute

Golfers follow the Masters 2011 - but - if you try to access masters.com right now you will get annoying popup messages from your browser telling you that you better stop JavaScript from executing because it takes too long. On my browser this looks like this:

 

JavaScript makes your browser unresponsive when browsing masters.com

JavaScript makes your browser unresponsive when browsing masters.com

This happens on every page. So - why does that happen?

Endless JavaScript is the problem
I used dynaTrace on both Internet Explorer and Firefox to diagnose this problem. The problem was really easy to spot. Here is the timeline showing me in which JavaScript handler the problem actually happens:

Problem is in the onload event handler triggered by jQuery

Problem is in the onload event handler triggered by jQuery

Double clicking on it brings me to the problematic method - getArraySample that gets called from setChildrenLayout with an empty array:

Passing an empty array but length with value 6 causes the while loop to never end

Passing an empty array but length with value 6 causes the while loop to never end

The problem can be fixed easily by checking the array. I hope this little analysis and recommendation will find the right people to fix this fast - because - Golfers want to see how their players are doing.

Related reading:

  1. How we improved our Web Site Performance Rank from D to A Timed with our new product launch we also updated our...
  2. Hands-On Guide: Verifying FIFA World Cup Web Site against Performance Best Practices Whether you call it Football, Futbol, Fussball, Futebol, Calcio or...
  3. How to identify IE Add-Ons such as Skype that impact Web Site Performance I occasionally get invited to do JavaScript/AJAX Performance Workshops. Last...
  4. Understanding Twitter’s Javascript in Multiple Browsers: How to Profile, Debug and Trace across Firefox and IE 6,7,8 Every time I meet-up with web developers, either through a...
  5. Best Practices on JavaScript and AJAX Performance JavaScript can save your day or it can cause you...
About Andreas Grabner
Andreas Grabner has been helping companies improve their application performance for 15+ years. He is a regular contributor within Web Performance and DevOps communities and a prolific speaker at user groups and conferences around the world. Reach him at @grabnerandi



ADS BY GOOGLE
Subscribe to the World's Most Powerful Newsletters

ADS BY GOOGLE

Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to ...
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objecti...
"MobiDev is a software development company and we do complex, custom software development for everyb...
Agile has finally jumped the technology shark, expanding outside the software world. Enterprises are...
Enterprises are adopting Kubernetes to accelerate the development and the delivery of cloud-native a...
In his session at 21st Cloud Expo, James Henry, Co-CEO/CTO of Calgary Scientific Inc., introduced yo...
While some developers care passionately about how data centers and clouds are architected, for most,...
"NetApp is known as a data management leader but we do a lot more than just data management on-prem ...
The question before companies today is not whether to become intelligent, it’s a question of how and...
"Akvelon is a software development company and we also provide consultancy services to folks who are...
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection...
"We're focused on how to get some of the attributes that you would expect from an Amazon, Azure, Goo...
"Codigm is based on the cloud and we are here to explore marketing opportunities in America. Our mis...
Data scientists must access high-performance computing resources across a wide-area network. To achi...
"CA has been doing a lot of things in the area of DevOps. Now we have a complete set of tool sets in...
High-velocity engineering teams are applying not only continuous delivery processes, but also lesson...
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offe...
"We're developing a software that is based on the cloud environment and we are providing those servi...
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22n...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22n...