Closed koresar closed 6 years ago
New result: 3931
bytes.
stampit.umd.min.js: 5393
-> 3931
bytes. It is 1462
bytes or 27.1% less.
5.26 KB ->
3.8 KB`
(Btw, GZIP: 1.84 KB
-> 1.77 KB
. Or 1906
-> 1790
bytes.)
So, I went crazy today.
New result: 3168
bytes. The performance did not suffer, even increased!
stampit.umd.min.js: 5393
-> 3168
bytes. It is 2225
bytes or 41.3% less.
5.26 KB
-> 3.09 KB
(Btw, GZIP: 1.84 KB
-> 1.54 KB
. Or 1906
-> 1578
bytes.)
Code become less readable though.
New new result: 2885
bytes. The performance is the same.
stampit.umd.min.js: 5393
-> 2885
bytes. It is 2508
bytes or 46.5% less.
5.26 KB
-> 2.82 KB
GZIP: 1.84 KB
-> 1.36 KB
. Or 1906
-> 1395
bytes.
Those are some impressive gains
This is what stampit is currently:
Thinking of releasing stampit v4:
stampit/isStamp
, stampit/isComposable
, and stampit/compose
. Ask users to use @stamp/is/stamp
, @stamp/is/composable
, and @stamp/compose
instead. (Almost none is using these anyway.)As the result stampit
and @stamp/*
modules will become fully compatible.
After size reduction the tests run fine in IE11:
Using stamp-specification v1.5.
New new result: 2761
bytes. The performance is the same.
stampit.umd.min.js: 5393
-> 2761
bytes. It is 2632
bytes or 49% less.
5.26 KB
-> 2.70 KB
GZIP: 1.84 KB
-> 1.29 KB
. Or 1906
-> 1322
bytes.
Recently @ericelliott posted a truly great concern that we are bloating stampit: https://github.com/stampit-org/stampit/pull/320#issuecomment-325812185
I agree, we should save those bytes (lines of code). I would even add that we should simplify stampit infrastructure because it was overly complexified with ES6->ES5 compilation.
Current stampit UMD build size is
5.26 KB
. By removing fancy ES6 stuff (plus some optimization techniques) I managed to reduce the size down to4.0 KB
.To be precise:
5393
->4128
bytes. It is1,265
bytes or 23.5% less.Simultaneously, this will fix #317, which was reported three times IIRC. (TL;DR: our own examples do not work in browsers.)
Also, this will reduce
devDepencencies
a bit.Pinging all people from the #320 discussion: @sethlivingston @FredyC @Mustack @jyboudreau @ericelliott
Should I proceed and submit the PR?