I've seen this topic come up a couple times, but I don't think I've seen any definitive solution posted.
I've tried the route of combining all my Foo.deploy.js, Bar.deploy.js into a single .js file, and then including that in the loadAmber() call. This /seems/ to work reasonably well, but the majority of the download size still comes from Amber internals.
In my application, the worst offenders in size are:
- 200K - jQuery UI
- 95K - Kernel-Collections
- 90K - jQuery
- 87K - Kernel-Objects
- 50K - Canvas
- 40K - MyApp
- 20K - Kernel-Classes
I can't do too much about the size of jQuery UI, but I can do a lot about the size of the Amber core, and the number of HTTP requests needed to fetch them. The only problem is I cannot figure out how to tell Amber not to auto-matically fetch Kernel-Objects.deploy.js, etc.
Has anybody managed to package their entire Amber javascript into a single .js file successfully?
- R. Tyler Croy
Code: http://github.com/rtyler Chatter: http://twitter.com/agentdero