Big JavaScript
JavaScript is becoming more important to the Drupal platform. JavaScript can help in making an application feel more responsive to the user. More responsive, that is, until the JavaScript gets so large and unwieldy that your users begin to experience performance issues caused by the JavaScript itself.
I like to think of JavaScript use in an application as falling somewhere on a continuum. On one end, an applications uses JavaScript for relatively minor user interface effects. On the other end is the single page load, long-lived application where almost every bit of the DOM is created using JavaScript. Drupal is somewhere in-between these extremes, and more JavaScript is being integrated as Drupal matures.
This presentation will expose many of the problems you are likely to encounter as you integrate more and more JavaScript on your site, along with solutions that I have used to successfully mitigate them.
Presentation topics:
- Memory, memory leaks, avoiding the dreaded swap
- Element selection within a very large DOM
- Slow additive requests
- Best practices for writing big JavaScript code