Erik's blog

Code, notes, recipes, general musings

notes from douglas crockford’s 12/17/08 talk on js performance

leave a comment »

Note: all credit for this material goes to Douglas Crockford, though nothing noted here is a direct quote.

  • don’t optimize w/out measuring
  • don’t optimize something that isn’t performed > once
  • optimize when we cross line of slow and/or failing performance
    • slow apps cause irritation
    • failing apps cause desertion
  • O(n^2) lines do not reflect optimizations dramatically
    • general rule: make n small
  • use ajax for jit data delivery
  • dyn el generation is faster than data fetch, so cache data, not markup
  • we can’t know what will take time before we start working, so test constantly to get preview of performance issues
  • Best practice for pagination?  Request data in chunks, ie let server handle pagination
  • how to speed up graphics rendering?  We’re unlikely to get performance boost for in JS layer, so look to browser-level support
  • can we speed up rendering & layout?
    • simplify css & html, but otherwise no.
    • we currently lack performance tools for measuring dom manipulation performance metrics
    • favor better ajax design over js optimization
    • reduce browser rendering by leveraging ajax interactivity, ie jit/on-demand page construction
Advertisements

Written by Erik

December 19, 2008 at 11:28 pm

Posted in notes

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: