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

At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with exp...
When a company wants to develop an application, it must worry about many aspects: selecting the infr...
Financial enterprises in New York City, London, Singapore, and other world financial capitals are em...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with exp...
Darktrace is the world's leading AI company for cyber security. Created by mathematicians from the U...
DevOps has long focused on reinventing the SDLC (e.g. with CI/CD, ARA, pipeline automation etc.), wh...
Cloud Storage 2.0 has brought many innovations, including the availability of cloud storage services...
Most modern computer languages embed a lot of metadata in their application. We show how this goldmi...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with exp...
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the c...
Intel is an American multinational corporation and technology company headquartered in Santa Clara, ...
Data center, on-premise, public-cloud, private-cloud, multi-cloud, hybrid-cloud, IoT, AI, edge, SaaS...
Atmosera delivers modern cloud services that maximize the advantages of cloud-based infrastructures....
Today's workforce is trading their cubicles and corporate desktops in favor of an any-location, any-...
Artifex Software began 25-years ago with Ghostscript, a page description language (PDL) interpreter ...
ShieldX's CEO and Founder, Ratinder Ahuja, believes that traditional security solutions are not desi...
Is your enterprise growing the right skills to fight the digital transformation (DX) battles? With 6...
In an age of borderless networks, security for the cloud and security for the corporate network can ...
Now is the time for a truly global DX event, to bring together the leading minds from the technology...
Moving to Azure is the path to digital transformation, but not every journey is effective. Organizat...