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

Andi Mann, Chief Technology Advocate at Splunk, is an accomplished digital business executive with e...
Most DevOps journeys involve several phases of maturity. Research shows that the inflection point wh...
Dynatrace is an application performance management software company with products for the informatio...
Today, we have more data to manage than ever. We also have better algorithms that help us access our...
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held Novemb...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: D...
@DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22...
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, ...
SYS-CON Events announced today that IoT Global Network has been named “Media Sponsor” of SYS-CON's @...
CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018,...
DXWorldEXPO | CloudEXPO are the world's most influential, independent events where Cloud Computing w...
Disruption, Innovation, Artificial Intelligence and Machine Learning, Leadership and Management hear...
The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news an...
Enterprises are striving to become digital businesses for differentiated innovation and customer-cen...
DXWorldEXPO LLC announced today that Telecom Reseller has been named "Media Sponsor" of CloudEXPO | ...
Consumer-driven contracts are an essential part of a mature microservice testing portfolio enabling ...
To Really Work for Enterprises, MultiCloud Adoption Requires Far Better and Inclusive Cloud Monitori...
Adding public cloud resources to an existing application can be a daunting process. The tools that y...
Using new techniques of information modeling, indexing, and processing, new cloud-based systems can ...
A valuable conference experience generates new contacts, sales leads, potential strategic partners a...