You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This benchmark compares the transfer size of different i18n libraries and their implementations.
8
+
This benchmark compares the transfer size of Paraglide JS (a compiler-based i18n library) against i18next (a runtime-based library).
9
9
10
-
The goal is to understand how the size of the library changes with different configurations, such as the number of locales, messages per page, and namespace size.
10
+
## Key Takeaways
11
11
12
-
If you are looking for a feature comparison, check out the [comparison table](/m/gerre34r/library-inlang-paraglideJs/comparison).
12
+
### Paraglide ships 3-10x smaller bundles than runtime libraries
13
13
14
-
💡 **Tip**: Paraglide JS has not reached its final optimizations yet. Tickets like [#88 per locale builds](https://github.com/opral/inlang-paraglide-js/issues/88) or [#354 pruning server side rendered messages](https://github.com/opral/inlang-paraglide-js/issues/354) are yet to be implemented. Pull requests are welcome!
14
+
In typical scenarios, Paraglide ships **47-144 KB** vs i18next's **205-422 KB**.
Paraglide's bundle size stays constant regardless of how many messages exist in your project—unused messages are tree-shaken away at build time.
33
+
34
+
Runtime libraries like i18next rely on manual namespacing to reduce bundle size, but namespaces still ship all their messages whether used or not. This means developers must carefully split messages across namespaces, and even then, unused messages within a namespace are still shipped.
@@ -40,7 +76,7 @@ Each library is tested in different modes:
40
76
-**<compiler-option>**: Mode with a [compiler option](https://inlang.com/m/gerre34r/library-inlang-paraglideJs/compiler-options) that is being tested.
41
77
-**i18next**:
42
78
-**default**: The default i18next implementation [source](https://www.i18next.com/overview/getting-started#basic-sample).
43
-
-**http-backend**: i18next implementation using HTTP backend for loading translations on dmeand[source](https://github.com/i18next/i18next-http-backend).
79
+
-**http-backend**: i18next implementation using HTTP backend for loading translations on demand[source](https://github.com/i18next/i18next-http-backend).
0 commit comments