Analyzing the scalability of Svelte.
http://svelte-scaling.acmion.com
Inspired by svelte-it-will-scale. If two studies come to similar results, then the conclusions are with a higher probability correct.
To perform the analysis on your own computer, do the following:
node install.js
, which installs all npm dependencies for projects. This step takes about 10 minutes to execute.node analyze.js
, which performs the actual analysis.index.html
in a browser to see the report.Warning: The analysis will take approximately 1 GB of disk space (mostly npm packages).
sample-apps/svelte-apps
are independent Svelte applications, which have been instantiated from the Svelte template app. These directories use the following naming convention: svelte-app-<n>
, where <n>
is the number of Svelte components in the app. The components are added in an incremental fashion, which means that svelte-app-<n + 1>
contains all of the components in svelte-app-<n>
(with the exact same source code) and one additonal component.<svelte-app-directory>/src/_components/
directory. The number of components in each app varies.<svelte-app-directory>/src/App.svelte
, which does not contain anything besides the code required by the components and one H1 tag that specifies the name of the app.<component-name>.svelte
files. All comments will be removed. All dependencies on external components will be removed (for example: feather-icons). Reliance on stores will be rewritten to standard JS variables. Sapper dependencies will be removed.npm run build
. This will build an optimized version of the app.Size | Target |
---|---|
Component Source | src/_components/ |
JS Bundle | public/build/bundle.js |
CSS Bundle | public/build/bundle.css |
Total Bundle | JS Bundle + CSS Bundle |
Gzipped JS Bundle | Gzipped public/build/bundle.js |
Gzipped CSS Bundle | Gzipped public/build/bundle.css |
Gzipped Total Bundle | Gzipped JS Bundle + Gzipped CSS Bundle |
sample-apps/react-apps
are independent React applications, which have been instantiated with npx create-react-app <app-name>
. These directories use the following naming convention: react-app-<n>
, where <n>
is the number of Svelte components in the app. The components are added in an incremental fashion, which means that react-app-<n + 1>
contains all of the components in react-app-<n>
(with the exact same source code) and one additonal component.<react-app-directory>/src/_components/
directory. The number of components in each app varies.<react-app-directory>/src/App.js
, which does not contain anything besides the code required by the components and one H1 tag that specifies the name of the app.<component-name>.js
files. All comments will be removed. All dependencies on external components will be removed (for example: feather-icons). Reliance on stores will be rewritten to standard JS variables. npm run build
. This will build an optimized version of the app.Size | Target |
---|---|
Component Source | src/_components/ |
JS Bundle | public/build/<all-js-files> |
CSS Bundle | public/build/<all-css-files> |
Total Bundle | JS Bundle + CSS Bundle |
Gzipped JS Bundle | Gzipped public/build/<all-js-files> |
Gzipped CSS Bundle | Gzipped public/build/<all-css-files> |
Gzipped Total Bundle | Gzipped JS Bundle + Gzipped CSS Bundle |