joelphilipgarcia
5 Sep 2011, 7:56 AM
Hello,
I'm trying to use Sencha 4.0.2a for a number of different applications. I'd prefer to use one JavaScript library for these applications, but I'm having some issues with the footprint of app-all.js for some of the simpler applications. The main issue is the footprint is too big.
One of the applications is a dynamically driven Form with an absolute layout. You can see the form by clicking here http://www.facebook.com/apps/application.php?id=132252616851904 and then clicking on HelpDesk or Support.
Today, after running "sencha create jsb", my jsb file still contains references to entities like the following:
{
"path": "../ext-4.0.2a/src/dd/",
"name": "DragSource.js"
},
{
"path": "../ext-4.0.2a/src/fx/",
"name": "Animator.js"
},
{
"path": "../ext-4.0.2a/src/chart/",
"name": "Chart.js"
},
I don't need drag and drop, animation, or charting for this particular app. I need a dynamically driven form with an absolute layout that's footprint is reasonable. The footprint today is 750 kb for a form.
I just got done walking the dependency hierarchy for some of my entities. It turns out the 'Ext.layout.container.Absolute' is what's sucking in the chart and some of the animation via requires: ['Ext.chart.axis.Axis', 'Ext.fx.Anim']. When I read the code for Absolute.js there is no reference to Axis and Anim so I commented the requires line out of ext-all-debug.js and Ext.layout.container.Absolute.js. I tested in dev and production mode, and the form application runs fine. I've just saved myself 25kb minified.
Is this a bug? I'm tempted to continue down the path of extracting only those entities that I need and keeping a separate copy of ext4.0.2a for only my form applications. Is this advisable? I know it will create headaches when I upgrade to a new version, but, otherwise, I don't see any other option...
Thoughts?
Thanks,
Joel
I'm trying to use Sencha 4.0.2a for a number of different applications. I'd prefer to use one JavaScript library for these applications, but I'm having some issues with the footprint of app-all.js for some of the simpler applications. The main issue is the footprint is too big.
One of the applications is a dynamically driven Form with an absolute layout. You can see the form by clicking here http://www.facebook.com/apps/application.php?id=132252616851904 and then clicking on HelpDesk or Support.
Today, after running "sencha create jsb", my jsb file still contains references to entities like the following:
{
"path": "../ext-4.0.2a/src/dd/",
"name": "DragSource.js"
},
{
"path": "../ext-4.0.2a/src/fx/",
"name": "Animator.js"
},
{
"path": "../ext-4.0.2a/src/chart/",
"name": "Chart.js"
},
I don't need drag and drop, animation, or charting for this particular app. I need a dynamically driven form with an absolute layout that's footprint is reasonable. The footprint today is 750 kb for a form.
I just got done walking the dependency hierarchy for some of my entities. It turns out the 'Ext.layout.container.Absolute' is what's sucking in the chart and some of the animation via requires: ['Ext.chart.axis.Axis', 'Ext.fx.Anim']. When I read the code for Absolute.js there is no reference to Axis and Anim so I commented the requires line out of ext-all-debug.js and Ext.layout.container.Absolute.js. I tested in dev and production mode, and the form application runs fine. I've just saved myself 25kb minified.
Is this a bug? I'm tempted to continue down the path of extracting only those entities that I need and keeping a separate copy of ext4.0.2a for only my form applications. Is this advisable? I know it will create headaches when I upgrade to a new version, but, otherwise, I don't see any other option...
Thoughts?
Thanks,
Joel