Thanks for looking into this David! To summarize your results - it looks like: a) For some reason moving the script tag being injected instead of using an XHR made loading faster b) Having all plugin files being loaded separately *is* slowing our start-up time down, but not by enough that it's an urgent issue.
On Mon, Jul 15, 2013 at 10:51 AM, David Kemp <[email protected]> wrote: > The following are obtained by running the mobilespec suite - all tests > The tests were run on a physical nexus 7 > > Summary: > * on Android , removing the xhr trims off about 250ms on load of > mobilespec. > * the multi-file plugin loading takes about 1.6 times as long as a single > file > > Details > In each case below: > * the first log line is written immediately on load. > * the second line is written when you press 'Automatic Test' > * the third line is written when you press 'Run All Tests' > The times are different because of caching that takes place, so the first > one is most interesting. > > Case 1: This case is manually constructed, lumping all plugin js files > together. > With plugins loaded in a single file + cordova_plugins.js(no xhr): > - plugin loading took 211ms > - plugin loading took 56ms > - plugin loading took 83ms > > Case 2: This case is what the 3.0 version did until: > CB-4016 / > https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=0ce4718 > With plugins loaded separately (about 60 files): > - plugin loading took 598ms > - plugin loading took 124ms > - plugin loading took 279ms > > Case 3: This case is what the 3.0 version does after: > CB-4016 / > https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=0ce4718 > With plugins loaded separately *withou*t xhr (about 60 files): > - plugin loading took 336ms > - plugin loading took 112ms > - plugin loading took 260ms >
