jeudi 16 avril 2015

cmd build corelibs+app cache vs cmd build app cache

Hi guys,



I have tried several aproaches without success, I need to separate ext-*-js in a separate file, from the app code autogenerate with cmd build. (reason , at the end)



Note: sencha build will autogenerate sencha based on requires, but at the end we will use all exjts components, so for this case there is not difference between ext-all,js and ext-**required**.js



Current scenary:

App.js : all sencha code + aplication code. Size: 3M.



Flow:

1. First user webbrowser request.

--- file download

2. Second user webbrowser request.

--- file loaded from cache



(Why we need this change?) So far here, it's ok, but the issue its that we recompile each week. So each week our users browser will redownload the app.js(>3M), we can't do this anymore.



So we need to split and compile into two files:

A) Core libs(extjs, ex:gant, ex:otherlib) (=2/3M that will be cached like for ever)

B) App code: (<1M, that will be cached per 7 days)



I know this it's case for several developers, so let's splite core libs and the app code so we won't be fetching all file just because we change a few lines in the app code.



thanks comunnity.





cmd build corelibs+app cache vs cmd build app cache

Aucun commentaire:

Enregistrer un commentaire