SheetJS / js-codepage

:currency_exchange: Codepages for JS
http://sheetjs.com
Apache License 2.0
151 stars 39 forks source link

43MB is kind of big #4

Closed max-mapper closed 9 years ago

max-mapper commented 10 years ago

is there any way to reduce the size of this module? e.g. npm install j ends up being a 100mb after npm install because it installs codepage twice

SheetJSDev commented 10 years ago

@maxogden the repo includes test files that were dragged into the node module. After removing it the full size of j is reduced to 23M.

In the future, I do plan on merging the xlsx and xls modules, at which point codepage will only be required once :)

As for reducing the script size: the complete table is about 2.8M. Based on the test suites, I constructed a stripped 375K script (which is what the web demos like http://oss.sheetjs.com/ use). Unfortunately, I can't say with certainty that the other code pages are not used (that would require playing with excel in different regions).

Side note: The xls and xlsx projects were originally separated due to licensing concerns surrounding the Open Specifications Promise, but it quickly became clear that a complete library requires knowledge from OSP specs and cannot be licensed under GPL or MIT/X11. https://github.com/kennethreitz/tablib/issues/114 describes the landscape fairly well. Now that they are both under the same license terms, I do hope to merge them soon :)

SheetJSDev commented 10 years ago

@maxogden 1.3.3 (should be pulled if you blow away and reinstall j) should get the latest version. j is down to 18M. Is there a way to avoid having to install the same module twice?

SheetJSDev commented 10 years ago

@maxogden without breaking the following constraints, we are at 14MB:

SheetJSDev commented 9 years ago

Package is at 3.6M now, probably not going to do much better without serious (and possibly incorrect) redesigns. It's possible to optimize by ignoring issues like the arabic percent sign but that will be explored at a later date