Big JavaScript application cause huge startup latency. A 1Mb of JavaScript initializes about ~600-3000ms! without touching any part of DOM. LMD is inspired by AMD and provides similar module interface. It evals module only when they are required.
- Modules are similar to AMD: there is a require, but no define (all defined on startup) nor exports (module function returns object)
- All modules are loaded at startup
- Each function-module is initialized (evaled) on demand
Original LMD: https://github.com/azproduction/lmd
"try/catch degrades performance" no doubt - its a 140bytes version.
Sencha Ext JS 4 full version, packed - (1Mb of JS localhosted)
iOS Safari 4 - load time 300ms, init time 3000ms
Firefox 8 - load time 32ms, init time 500-600
Sencha Ext JS 4 full version, packed, JSONed - load time same, 10-30ms init time