Putting Experience First
Alex Russell
Dojo Developer Day
Jan 13th, 2007
Thesis: Page Load Times Imply Quality
- Network time
- Size
- # of requests
- Parallelization
- Page parse
- Widget creation
- DOM traversal
- Attribute iteration
- Case normalization and lookup
- Data structure allocation/iteration
IE: 10x
FF: 18x
We Can Do Better By Doing Less
- Auto parent/child relationships
- Lose declarative XML syntax (HTML only)
- Parser oblitterated
- Class instantiation
- Property setting
- DOM creation
- Event/DOM hookup
FF, new parser (best case)
FF: 6059ms vs. 950ms
IE: 46862ms vs. 2644ms
- Button widget was doing manual layout
- Tundra Button is pure CSS
- Remove image nodes
Let The Browser Do The Work
Improving Page Load Performance
- Things we can't affect:
- Things we can:
- Code size
- Pre-gzip compression
- File bundling
- Parallelization (x-domain)
| |
Vanilla |
Without LFX |
| trunk |
145K |
92K |
| dojo-lite |
117k |
65k |
| reduction |
20% |
30% |
- Stub package loader
bootstrap2.js
- Backward compatibiltiy
- Lots of crappy functions
- Remove degrees of freedom
- Learn to say no
- Don't layout from JS
- Profile
- Read code
- Don't be dumb