Closed focussing closed 7 years ago
I have commented out all functions, the expression parser that I do not use, and finally end up with a math.min.js file of 208kB. This file has reduced the build time from almost an hour, to 2 minutes. This is off course a lot, but 2 minutes to wait before every build is long compared to the 12 seconds it was...
I cannot see a way of reducing it more. Tried to comment out the matrix and complex numbers parts, but that gives errors during npm build. However I can imagine that removing these types will help a lot... Is there a way to do that?
Best regards, Raymond
I think you're asking two questions here:
math.add
, you also include all datatypes like Matrix, Complex, BigNumber, which are quite large. It is possible to strip the custom build further, though it requires more work: you can instruct the bundler that you use (like webpack or browserify) to exclude specific files or paths with wildcards.1) okay... so it is possible but not easy/fast. Any suggestions how to do that? You are using gulp so that itself would be easy. Otherwise I will continue with what I have now.
2) I use mathjs in an APP development environment, and building the APP when mathjs included takes a lot of time to build. Building mathjs itself is fast.
Thanks for your reply!
I think the best way to start stripping off parts of math.js that you don't need is:
type/matrix
folder. Then exclude these paths and files from bundling.I'm curious to hear whether you can make it work for your use case...
Just a stupid question: if you're just using a few BigNumber functions, can't you just use the BigNumber library used by math.js instead (decimal.js)?
NOT a stupid question :) this might be a good opportunity, I will surely take a look into that. I can easily setup a test with decimal.js. Thanks for pointing me to that direction.
In the meantime I tested with the n64 library which also gives good results.
sounds good!
I think we can close this issue right?
Ok we can. Thank you 👍🏻
Best regards, Mit freundlichen Grüßen, Met vriendelijke groet, Raymond Verbruggen
FOCUSSING B.V. Mispel 8 7621 WB Borne Netherlands +31 6 250 500 69 mail@focussing.nl www.focussing.nl
Op 29 jul. 2017 om 10:56 heeft Jos de Jong notifications@github.com het volgende geschreven:
I think we can close this issue right?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
okido
Hello Jos, (goedemorgen)
What a great library!!
The current (min) build is around 470kB. For my application (Appcelerator Titanium) this is quite large, that is appears to be hanging. After 30 minutes it continues. Can I make a custom build (or could you help me with that) which only contains the functions I use? This is important for me, currently this blocks releasing a test app for my customer...
I use bignumbers only with the following functions:
This is my code:
Looking forward to hearing from you.