halfnelson / svelte-it-will-scale

Generate a chart showing svelte's overhead

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect Graph Legend (Under the heading "Finding the Svelte Bundle Size Formula")?

Acmion opened this issue · comments

The graph under the heading "Finding the Svelte Bundle Size Formula" seems to have an incorrect legend. The "minified" and "original" should be switched, since the minified should not be larger than original.

How is this possible? Could you provide the files for inspection, for example, under a "data" directory?

What would the result be if you just gzipped the original then? Would it be less than gzip + minification?

I understand that the components grow after Svelte processes them.

So in this analysis, "Original" = size of the entire "src" directory?

The confusion might be caused by the fact that usually when doing JS development we have these following stages:

  1. Source JS file, which could be called "Original"
  2. Minified JS file, which could be called "Minified"
  3. Gzipped minified JS file, which could be called "Gzip + Min"

Hmm,

I had a go at this myself (still in progress).

Check the methodology here:
https://github.com/Acmion/SvelteScaling

The results here:
https://acmion.github.io/SvelteScaling/

Our slopes for Svelte are similar, but the differences in intercepts is quite large.

@Acmion

When x = 0 then y has to give the bundle size of the framework. Your intercepts have to be exactly the same. If they are not, then consider the following two cases:

  1. Someone is doing linear regression without taking the intercept as a known.
  2. Someone is using different version of React or Svelte and hence different bundle size.

@lillallol

Yes, the different intercepts is most likely caused by different versions.

However, the initial issue here was that the fact that in this analysis the size of "minified" is greater than of "original". This does not intuitively make sense and I initially misunderstood the meaning of these. If the labels were changed to "minified" and "source", then everything would be clear.