With virtualized workloads proliferating widely, the nature of management and optimization tools will need to undergo a dramatic change. Platforms and best practices that perform intelligent scheduling of workloads across virtual machines, as well as diligent provisioning and de-provisioning of VMs to control VM sprawl, will be crucial to ensure maximum performance and utilization of infrastructure.
In his session at the 9th International Cloud Expo, James Thomason, Chief Architect at Gale Tec...| By Andreas Grabner | Article Rating: |
|
| June 24, 2011 10:00 AM EDT | Reads: |
1,798 |
Last week at Velocity we hosted a Birds of a Feather Session (BoF) and offered the attendees to analyze their web sites using dynaTrace Ajax Edition. Besides finding the typical performance problems (no cache settings, too many images, not minimized content, …) we found several sites that had one interesting problem in common: OLD VERSIONS of JavaScript libraries such as YUI, jQuery or SPRY.
Why are outdated JavaScript Libraries a problem?
JavaScript libraries such as jQuery provide functions that make it easy for web developers to achieve certain things, e.g.: change the style of certain DOM elements. Most of these libraries therefore provide methods called $, $$ or find that allow finding DOM elements by ID, Tag Name, CSS Class Name or specific DOM attribute values.
The following is a screenshot of the Performance Report analyzing the Boston Bruins Page on msn.foxsports.com using Firefox 3.6. The Performance Report highlights 3 interesting things:
- High Client Time (3.5 seconds in JavaScript execution until the Page was Fully Loaded)
- 39 JavaScript! blocks that executed longer than 20ms
- 38 calls to Spry.$$ for looking up an element by Class Name with an average of 80ms execution time
Looking up elements by class name takes 80ms on average. We see 38 calls with a total JavaScript execution time of 3 seconds. Is that normal? Even on Firefox?
The History on CSS Class Name Lookups
Looking up elements by CSS Class Name is a very popular lookup method. Browsers such as Firefox or Chrome supported this lookup natively with a method called getElementsByClassName. Older versions of Internet Explorer don’t support this.
The lack of this native implementation in IE caused many JS libraries to implement this missing feature using JavaScript. The implementations traverse through the complete DOM Tree and perform a string match on the CSS Class Name property. This works well and allows web developers to use one library that works across all browsers and browser versions. The down side of this approach is that traversing the DOM is one of the slowest operations you can do in the browser. The larger the DOM, the longer these lookup methods take to execute. I’ve blogged about this several times: 101 on jQuery Selector Performance, 101 on Prototype CSS Selectors, Top 10 Client-Side Performance Problems.
Good news is that newer versions of Internet Explorer now support the Selector API allowing JavaScript frameworks to leverage this native implementation and with that optimizing lookup performance.
Why is Spry.$$ so slow on Firefox?
Let’s get back to our example from above. We learned that newer browsers support lookups by class name natively and we also learned that Firefox, Chrome, Safari, Opera, … had the native lookup methods implemented for a while. Does this mean that 80ms for looking up elements by class name is normal? No – it is not!! It should take a fraction of that. And here is why.
The following screenshot shows the JavaScript PurePath of Spry.$$(“.prev_label”). The PurePath shows us what happens internally in this method and why it takes 170ms for that call to complete:
Instead of leveraging the native getElementsByClassName method of Firefox the implementation of Spry.$$ uses its own implementation. Using getElementsByTagName with no specific tag name returns ALL DOM Elements – 2787 in total on that page. The library then iterates through all of these DOM elements, reading the className DOM Property and matching it against “prev_label”. Accessing 2787 DOM Properties is a costly operation and takes 170ms in that instance. That’s why Spry.$$ takes that long.
Solve this problem by upgrading your Libraries
Older versions of JavaScript libraries didn’t necessarily check the browsers capabilities for looking up DOM Elements. These libraries always used their own implementation. Newer versions of libraries do check the capabilities and take advantage of any performance enhancement they can get by using the native available implementations.
On this particular website – and also the others we looked at during the BoF session – an older version of the JavaScript library was used. Upgrading to a newer version would solve this problem. I know – upgrading is not always as easy as it sounds. Lots of testing is involved to ensure that your web site still works as expected. On the other side – speeding Page Load Time by 3 seconds by “just” updating your JavaScript library is a good argument in doing so.
Conclusion
Make sure you stay up-to-date with your library versions. Library providers are focusing a lot on performance and they make sure to optimize these libraries for the different browsers out there.
Tips and Tricks
The dynaTrace Performance Report identifies slow running JavaScript handlers and also identifies the jQuery $ method. In the case of Spry.$$ (or maybe other lookup methods that your library provides) the report won’t list these methods in the Contributor list. A little trick helps though to identify how much performance impact these methods have on your page. Simply Drill into the Hotspot View. Then type “Spry.$$” and sort by Total Sum. This will show you all invocations of Spry.$$ and how much time it takes to execute them:
Learn how to use the different views and features of dynaTrace Ajax Edition by watching the 15 available Video Tutorials
Related reading:
- Slow Page Load Time in Firefox caused by old versions of YUI, jQuery, … We blogged a lot about performance problems in Internet Explorer...
- Uncover JavaScript JSON Parsing errors with IE Compatibility Mode We just launched our new corporate web site. Right after...
- Testing and Optimizing Single Page Web 2.0/AJAX Applications – Why Best Practices alone don’t work any more // Testing and Optimizing of what I call “traditional” page-based...
- Top 10 Client-Side Performance Problems in Web 2.0 Inspired by the Top 10 Performance Problems post which focuses...
- Antivirus Add-On for IE to cause 5 times slower page load times The dynaTrace AJAX Community has been really active lately –...
Published June 24, 2011 Reads 1,798
Copyright © 2011 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Andreas Grabner
Andreas has over a decade of experience as an architect and developer, and currently works as a senior performance architect and technology strategist for dynaTrace Software, where he influences product strategy and works closely with customers in implementing performance management solutions across the application life cycle. He is a regular speaker at software conferences, writes for a number of technology publications, and blogs at http://blog.dynatrace.com
- Thirty Tips to Optimize HTML/CSS/Images for Smooth Web Experience
- Sun Settles Eolas’ Java Claims
- Three Tips to Successfully Load Test Adobe Flex Applications
- How Bad Outdated JavaScript Libraries Are for Page Load Time
- Why Response Times Are Often Measured Incorrectly
- Nuxeo Releases New Version of Open Source Document Management Software
- Five Years Later: OpenAJAX Who?
- Will Microsoft’s Mango Shake Enterprise Mobility, Part 2?
- Following Best Practices
- Handbook of Human Factors in Web Design, Second Edition
- HTML5 - What I Am Learning
- Mobile Application Downloads to Approach 48 Billion in 2015, Says In-Stat
- Thirty Tips to Optimize HTML/CSS/Images for Smooth Web Experience
- Thirty Tips to Improve JavaScript Performance
- Sun Settles Eolas’ Java Claims
- How a Java Programmer Should Select the Right Lane in a Supermarket
- GISUser.com GIS Data, news, jobs, software tips, mashup news – Developing Location Based Services (LBS) Mobile Applications
- Application Performance & Architectural Problems You Can Find in an Hour
- The Cost of an Exception
- Application Performance Management in WebSphere Environments
- Tips on Creating Stable Functional Web Tests
- Three Tips to Successfully Load Test Adobe Flex Applications
- Application Performance Monitoring in Production
- RIM rolls out BlackBerry WebWorks SDK 2.0 with PlayBook launch
- Building a Drag-and-Drop Shopping Cart with AJAX
- What Is AJAX?
- Google Maps! AJAX-Style Web Development Using ASP.NET
- Flashback to January 2006: Exclusive SYS-CON.TV Interviews on "OpenAjax Alliance" Announcement
- How and Why AJAX, Not Java, Became the Favored Technology for Rich Internet Applications
- AJAXWorld Conference & Expo to Take Place October 2-4, 2006, at the Santa Clara Convention Center, California
- AJAX Sponsor Webcasts Are Now Available at AJAXWorld Website
- "Real-World AJAX" One-Day Seminar Arrives in Silicon Valley
- AJAXWorld University Announces AJAX Developer Bootcamp
- Where Are RIA Technologies Headed in 2008?
- AJAX Support In JadeLiquid WebRenderer v3.1
- Struts Validations Framework Using AJAX
With virtualized workloads proliferating widely, the nature of management and optimization tools will need to undergo a dramatic change. Platforms and best practices that perform intelligent scheduling of workloads across virtual machines, as well as diligent provisioning and de-provisioning of VMs to control VM sprawl, will be crucial to ensure maximum performance and utilization of infrastructure.
In his session at the 9th International Cloud Expo, James Thomason, Chief Architect at Gale Tec...Jul. 15, 2011 11:00 AM EDT Reads: 790 |
By Pat Romanski Data motility is the concept that data in the cloud is not just mobile, but can move on its own without administrators’ knowledge or consent. Enterprise agreements with cloud vendors specify that information placed in the cloud will be available when a company wants it – but not where it is living from one moment to the next.
In his session at the 9th International Cloud Expo, Dave Asprey, VP of Cloud Security at Trend Micro, will address the important concerns that this “always available from...Jul. 15, 2011 09:45 AM EDT Reads: 794 |
By Elizabeth White Google and Microsoft are in a battle for the hearts and minds of corporations worldwide. You and your company can benefit from this battle...if you are Cloud-Ready.
In his session at the 9th International Cloud Expo, Jason Lieblich, Founder and CEO of Exoprise Systems, will discuss how you can arm your organization with the right data, tools and systems to manage this transition to the cloud. This battle will define the computing landscape for decades to come. Be prepared!Jul. 14, 2011 10:00 AM EDT Reads: 951 |
By Elizabeth White The July 29 deadline for the Call for Papers for the 9th International Cloud Expo, to be held November 7-10, at the Santa Clara Convention Center in Santa Clara, CA, is fast approaching.
As enterprises in ever-increasing numbers start to evaluate cloud computing, many are assessing which applications can run in public clouds, which should run in a private cloud, and how to ensure that applications will be portable from one to another. Since there will be many different kinds of clouds, another ...Jul. 14, 2011 06:45 AM EDT Reads: 3,124 |
By Pat Romanski Performance problems are one of the most cited concerns about the cloud. But is it really the cloud or the application? What does performance mean anyway when you can scale to thousands of servers?
In his session at the 9th International Cloud Expo, Michael Kopp, Technology Strategist at dynaTrace Software, will discuss why the traditional means of performance management and troubleshooting no longer work and how this affects everything. Most important, we will look at how to identify the root...Jul. 13, 2011 11:30 AM EDT Reads: 969 |
By Elizabeth White Due to a paradigm shift in developing the latest wave of mobile applications, to use the existing or "old" approach to mobile development has significant limitations.
In his session at the 9th International Cloud Expo, Fima Katz, President & CEO of Exadel, will discuss a new, quite revolutionary way of building the next-generation mobile cloud applications. In this approach everything, from development platform to deployment to resources, resides in the cloud. The underlying platform (PaaS) al...Jul. 13, 2011 11:00 AM EDT Reads: 951 |
By Elizabeth White Simplifying and automating IaaS provisioning helps companies slash costs with shared dynamic environments while sustaining workload performance expected in dedicated environments. Will 2012 be the year when enterprises fully embrace their heterogeneous environments to get the best of both cloud worlds, while using legacy IT equipment to build dynamic clouds running virtualized and non-virtualized workloads?
In his session at the 9th International Cloud Expo, Akhil Sahai, VP of Product Manageme...Jul. 13, 2011 10:00 AM EDT Reads: 944 |
By Liz McMillan Cloud computing is commonly described in terms of service-style access: "Infrastructure as a Service" (IaaS), "Platform as a Service" (PaaS), and "Software as a Service" (SaaS) are popular monikers attached to different styles of cloud computing. In the enterprise, however, it is often better to consider an alternative view in which services themselves are part of the infrastructure.
In his session at the 9th International Cloud Expo, Dr. Rich Wolski, CTO and Co-founder of Eucalyptus Systems I...Jul. 13, 2011 09:15 AM EDT Reads: 961 |
By Liz McMillan SYS-CON Events announced today that Vyatta, the leader in software-based networking for physical, virtual and cloud infrastructures, will exhibit at SYS-CON's 9th International Cloud Expo, which will take place on November 7–10, 2011, at the Santa Clara Convention Center in Santa Clara, CA.
Vyatta is disrupting the networking industry by delivering a software-based network operating system that is portable to standard x86 hardware as well as common virtualization and cloud computing platforms. ...Jul. 12, 2011 03:00 PM EDT Reads: 1,046 |
By Elizabeth White Evolutionary IT organizations are taking a measured path to cloud, virtualizing and automating along the way. Other IT organizations are following the “fast track,” meeting limited user needs with Cloud Pilot implementations. This session is a dynamic exploration of the benefits (and challenges) that diverse IT service adoption cultures will experience. Transformational cloud projects seek to overhaul IT to align with this more flexible and responsive paradigm, starting with a comprehensive visi...Jul. 12, 2011 12:15 PM EDT Reads: 951 |











Data motility is the concept that data in the cloud is not just mobile, but can move on its own without administrators’ knowledge or consent. Enterprise agreements with cloud vendors specify that information placed in the cloud will be available when a company wants it – but not where it is living from one moment to the next.
In his session at the 9th International Cloud Expo, Dave Asprey, VP of Cloud Security at Trend Micro, will address the important concerns that this “always available from...
Google and Microsoft are in a battle for the hearts and minds of corporations worldwide. You and your company can benefit from this battle...if you are Cloud-Ready.
In his session at the 9th International Cloud Expo, Jason Lieblich, Founder and CEO of Exoprise Systems, will discuss how you can arm your organization with the right data, tools and systems to manage this transition to the cloud. This battle will define the computing landscape for decades to come. Be prepared!
The July 29 deadline for the Call for Papers for the 9th International Cloud Expo, to be held November 7-10, at the Santa Clara Convention Center in Santa Clara, CA, is fast approaching.
As enterprises in ever-increasing numbers start to evaluate cloud computing, many are assessing which applications can run in public clouds, which should run in a private cloud, and how to ensure that applications will be portable from one to another. Since there will be many different kinds of clouds, another ...
Performance problems are one of the most cited concerns about the cloud. But is it really the cloud or the application? What does performance mean anyway when you can scale to thousands of servers?
In his session at the 9th International Cloud Expo, Michael Kopp, Technology Strategist at dynaTrace Software, will discuss why the traditional means of performance management and troubleshooting no longer work and how this affects everything. Most important, we will look at how to identify the root...
Due to a paradigm shift in developing the latest wave of mobile applications, to use the existing or "old" approach to mobile development has significant limitations.
In his session at the 9th International Cloud Expo, Fima Katz, President & CEO of Exadel, will discuss a new, quite revolutionary way of building the next-generation mobile cloud applications. In this approach everything, from development platform to deployment to resources, resides in the cloud. The underlying platform (PaaS) al...
Simplifying and automating IaaS provisioning helps companies slash costs with shared dynamic environments while sustaining workload performance expected in dedicated environments. Will 2012 be the year when enterprises fully embrace their heterogeneous environments to get the best of both cloud worlds, while using legacy IT equipment to build dynamic clouds running virtualized and non-virtualized workloads?
In his session at the 9th International Cloud Expo, Akhil Sahai, VP of Product Manageme...
Cloud computing is commonly described in terms of service-style access: "Infrastructure as a Service" (IaaS), "Platform as a Service" (PaaS), and "Software as a Service" (SaaS) are popular monikers attached to different styles of cloud computing. In the enterprise, however, it is often better to consider an alternative view in which services themselves are part of the infrastructure.
In his session at the 9th International Cloud Expo, Dr. Rich Wolski, CTO and Co-founder of Eucalyptus Systems I...
SYS-CON Events announced today that Vyatta, the leader in software-based networking for physical, virtual and cloud infrastructures, will exhibit at SYS-CON's 9th International Cloud Expo, which will take place on November 7–10, 2011, at the Santa Clara Convention Center in Santa Clara, CA.
Vyatta is disrupting the networking industry by delivering a software-based network operating system that is portable to standard x86 hardware as well as common virtualization and cloud computing platforms. ...
Evolutionary IT organizations are taking a measured path to cloud, virtualizing and automating along the way. Other IT organizations are following the “fast track,” meeting limited user needs with Cloud Pilot implementations. This session is a dynamic exploration of the benefits (and challenges) that diverse IT service adoption cultures will experience. Transformational cloud projects seek to overhaul IT to align with this more flexible and responsive paradigm, starting with a comprehensive visi...
When thinking about driving and fuel efficiency, you might think of hybrid cars and possibly ride sharing. IT departments are going through the same changes in thought.
Previously this blog looked at the reality of running everything in your company using cloud computing. The conclusion, especially...
We all know that the SaaS model of Cloud Computing delivers software as a service over the Internet, eliminating the need to install and run the application on the customer's own computer and simplifying maintenance and support.
As SaaS providers grow, especially the providers for the same kind o...
According to the findings from a global market study, the health care sector has a highly complex IT environment that's supporting a very diversified professional user population (i.e., clinicians) -- along with their patients in life-critical situations. The industry is currently facing growing eco...
In an arrangement that brings together the work of JavaScript inventor Brendan Eich and Node.js inventor Ryan Dahl, Joyent and Cloud9 IDE, Inc. today announced an agreement to provide web application developers with a one-stop cloud development and deployment platform for Node.js applications from w...
Google Docs has a nice versioning feature that allows you to keep a change list of what you have done to the files. It is a very convenient feature when you are collaborating on a file with colleagues.
Gladinet Cloud Desktop has been supporting Google Docs since 2008. It allows users to upload and ...
Remember the older web applications and client server applications of the last decade, most enterprise business users are used to logging on to individual applications with their credentials or use single sing on mechanisms and they are presented with a Menu of individual screens based on thei...
A visitor to this blog was asking my opinion on cloud storage vs. traditional storage (“storage storage” was the exact wording for the latter). There are probably as many opinions about this topic as there are cloud storage marketers – and probably even a lot more – but that doesn’t keep me from gi...
Here we are on July 12, mid-summer when you think most people are wondering about going to the beach in 90 degree weather, and instead we have big cloud news. Early this morning we were greeted with the announcement that Citrix is buying Cloud.com for more than $200M. After the initial congratulati...
The growing consumer affinity to cloud is spurring on various new technological trends. It's not all new technology mind you, but there seems to be a growing appetite for anything that can remotely be put into the context of cloud computing. In some ways, cloud has been good for bringing previously ...
JSON Activity Streams offers some interesting new scalability pattern possibilities via layer 7 (application) switching.
One of the most interesting aspects of deploying applications is figuring out how to scale them. There’s many options, from simple scale out and scale up to more advanced archite...

























