bower / decompress-zip

Module that decompresses zip files
MIT License
102 stars 76 forks source link

Performance improvements #10

Closed wibblymat closed 10 years ago

wibblymat commented 11 years ago

Decompress zip is slow. I mean, like, really slow.

❯ time bower install extjs=http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip
bower not-cached    http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip#*
bower resolve       http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip#*
bower download      http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip
bower extract       extjs#* ext-4.2.1-commercial.zip
bower resolved      http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip#e-tag:5e5ef2426

real    46m37.575s
user    46m12.850s
sys 2m13.090s

For reference:

❯ time unzip ext-4.2.1-commercial.zip

real    0m4.470s
user    0m2.190s
sys 0m1.000s
addyosmani commented 10 years ago

Ouch :/ Some performance improvements would be really great here. Do we know how well it compares to the older solutions we decided not to opt for? I ask in case there are optimizations we can borrow.

wibblymat commented 10 years ago

@addyosmani I'll have a look at the other ones later but I know that node-unzip just died altogether on this file (stack overflow).

I do have some ideas that should help a lot.

wibblymat commented 10 years ago
❯ time bower install extjs=http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip
bower not-cached    http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip#*
bower resolve       http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip#*
bower download      http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip
bower extract       extjs#* ext-4.2.1-commercial.zip
bower resolved      http://cdn.sencha.com/ext/commercial/ext-4.2.1-commercial.zip#e-tag:5e5ef2426
bower install       extjs#e-tag:5e5ef2426

extjs#e-tag:5e5ef2426 bower_components/extjs

real    0m54.756s
user    0m44.360s
sys 0m9.530s

And about half of that is download and install.