4 ms·
Almost 1 MB of JavaScript transferred to render a single chart? I am afraid that is not acceptable. I mean no disrespect whatsoever to the author of the library
by SimeVidas 7y ago
Almost 1 MB of JavaScript transferred to render a single chart? I am afraid that is not acceptable. I mean no disrespect whatsoever to the author of the library, but sending that amount of JS for a single component is just outside of any reasonable performance budget.
That being said, a server-side or build-step tool that generates lean SVG code? Yes, please.
- wilsonrocks 7y agoAcceptable to whom?
- SimeVidas 7y agoThe general public.
- timqian 7y agoAuthor here, thanks for mentioning about this issue here. The lib size is over 400kb because I imported the whole d3 lib into it, but actually only using small fraction of it. I will optimize the size later. server side rendering/svg generator is also a good idea, thanks for the suggestion
- timqian 7y agoUpdates: the total js file is around 66KB now https://github.com/timqian/chart.xkcd/pull/7 https://github.com/timqian/chart.xkcd/pull/7
- SimeVidas 7y agoGreat job!