Closed veged closed 7 years ago
What's the easiest way to understand an unneeded code and cut it off?
I'd recommend using disc
. Piping browserify --full-paths lib/index-basic.js | discify
into a codepen gives: https://codepen.io/etpinard/full/YQVqeX/
@veged from your :+1: reaction, I'll assume that my reply was satisfactory.
As this issue won't directly result in a PR, I'll close it.
Note that, we are planning on excluding components/
from plotly.js/lib/core
in v2 which should help shrink custom bundles with less effort.
Thanks for writing in.
@etpinard actually I can't make any significant size cuts :-/
here is the disc
I've got: https://codepen.io/veged/full/XggaPM/
maybe you can help to understand which parts can be cutted off in case of rendering just trivial lines plot with annotation?
@etpinard also, do you use somehow ability of D3 itself to customize bundle https://medium.com/towards-data-science/d3-js-the-custom-modular-bundle-now-bebd6f25bc8b ?
Is there any way to optimize bundle size for my custom Plotly.js build?
Right now plotly-basic.js is 215.7K and, for example, highcharts.js is 70K.
I try to do something like this (accordingly to my custom needs in simple line plot):
But I achieve only 194K (instead of 215.7K initially) in final plotly-basic.min.js.gz.
Is there any way for further optimization of bundle size? What's the easiest way to understand an unneeded code and cut it off?