background preloader

Profiling

Facebook Twitter

Perf4J 0.9.12 - Home. Talks at the 2009 jQuery Conference. This past weekend was the 2009 jQuery Conference here in Boston. It was an incredible event – 300 people attended and a ton of discussion, collaboration, and learning happened. Nearly the entire jQuery project team had the opportunity to meet for two days prior to the conference and hash a number of things out – figuring out most of the planning for the upcoming year. The core dev team also had the opportunity to meet and work for two days just after the conference.

We’re much closer to shipping 1.3.3 now (which is likely to become 1.4, with all the new features that’re being added). (Left to Right: Mike Hostetler (Infrastructure), John Resig (Core), Paul Bakaus (UI), Brandon Aaron (Core), Richard D. A full list of the presentations that were given can be found on the events site. Recent Changes to jQuery’s Internals A run-down of all the features and internal changes made in 1.3, 1.3.1, 1.3.2, and 1.3.3/1.4. Understanding JavaScript Testing State of jQuery ’09 Comments are closed. Deep Profiling jQuery Apps. This evening I was playing around with the idea of profiling jQuery applications – trying to find a convenient way to completely analyze all the code that is being executed in your application.

I’ve come up with a plugin that you can inject into a jQuery site that you own and see how the performance breaks down method-by-method. Here’s how you can try this plugin on your own site: Step 1: Copy site HTML, add base href, add plugin. For example, Github.com uses jQuery for a few basic effects and pieces of interaction (they use considerably more on pages beyond the homepage). I took a copy of their page, added a <base href> to the top and injected the profiling plugin giving a resulting test page.

Before: <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> ... After: <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <base href=" ... Step 2: Use the site normally. Use the site as you normally would. Step 3: View data. JavaScript Function Call Profiling. With jQuery 1.3.2 out the door I’ve been looking for more ways to profile and optimize jQuery. Previously I did a survey of jQuery-using sites to figure out which selectors they were using. This led to the construction of the new Sizzle Selector Engine which targeted those selectors for improvement.

Additionally, I constructed a deep profiling plugin for jQuery which helped to spot methods that were taking a long time to run in live jQuery sites. This helped bring about the improvements in jQuery 1.2.6, 1.3, and 1.3.2. What do we tackle next? A good place to start would be to tackle optimizing methods that are obviously inefficient – but how do we determine that? FireUnit Profiling Methods Yesterday I did some work to make getting at the profiling data possible, adding two new methods to FireUnit. fireunit.getProfile(); Run this method after you’ve run console.profile(); and console.profileEnd(); to get a full dump of the profiling information.

Fireunit.profile( fn ); How To Use The Results. The Best Kept Secret in the JDK: VisualVM. It's amazing the things that are right in front of you that you don't realise. VisualVM is probably the best example of this in the Java community. Everytime you go and update your JDK, you go straight to your IDE and capitalise on the new features provided.

At least, that's what I thought I was doing. I first read about VisualVM in an article Geertjan Wielenga wrote back in February of last year when the tool had it's third milestone release. VisualVM could be the most important tool for Java developers, as well as being the best kept secret. In a time where we're still trying to prove that Java isn't slow, this is the tool to help us keep the promise of performant Java applications. VisualVM In A Nutshell VisualVM is a visual tool that integrates some of the commandline JDK tools and gives you powerful profiling capabilities. For me, these features are critical. How To Get VisualVM All you need to do is click on the jvisualvm.exe and the application starts up. Using VisualVM Heap Dump. JQuery tips for userexperience.

Visual jQuery 1.2.6.