halfnelson / svelte-it-will-scale

Generate a chart showing svelte's overhead

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repo has to be updated.

lillallol opened this issue · comments

A lot of people stumble upon this repo when they want to find the inflection point of Svelte with other frameworks.

As far as I understand the linear regression of this repo has not been done with known intercept. The intercept has to be treated as known because for x = 0 (i.e. no component source), y has to give the bundle size of the framework. This will actually decrease the intercept but it will increase the slope for both framework equations. I wonder how the inflection point will be affected due to these changes.

The only thing you need to do is to replace the intercept in the formula that gives the slope. You have to replace it with the min+gzip bundle size of the framework.

I see that you have made the comparison of svelte with Preact here. Why this is not included in this repository README.md? Making the aforementioned intercept correction for the Preact equation, the intercept will decrease by around 2.5kb, which is significantly more to the 600b intercept decrease of svelte. But that means that the slope of Preact will increase more when compared to svelte. So it is not clear how the inflection point will change.

How that 600b was calculated? From here we have that Svelte min+brotli bundle size is 1.85kb. From google search : gzip vs brotli we have:

Javascript files compressed with Brotli are 14% smaller than gzip

and hence:

2811 - (1.85*1024/0.86) = 600 bytes. 

It is good to have an answer to "Will it Scale", and we can be assured that yes "It Will Scale"

This is misleading and hence it needs to change. Whether Svelte scales or not depends to which framework it is compared and for what app and for what needs.