Benchmarks
Numbers generated by python -m pyweb.bench and pyweb build when this site
was built. They measure PyWeb itself; they are not a comparison with other frameworks.
#What ships to the browser
- 46,577 B shared runtime, minified
- 14,939 B shared runtime, gzip
The runtime is downloaded once and cached across pages (production builds content-hash it). Each interactive page adds its own module; pages with nothing dynamic ship no JavaScript at all.
| Benchmark app | Lines | Page JS (gzip) | Total JS incl. runtime (gzip) | HTML | Compile | Server render |
|---|---|---|---|---|---|---|
| counter | 12 | 300 B | 15239 B | 377 B | 2.5 ms | 0.039 ms |
| todo | 22 | 452 B | 15391 B | 421 B | 2.0 ms | 0.053 ms |
| blog | 9 | 0 B | 0 B | 291 B | 0.7 ms | 0.035 ms |
#Example apps
| Example | Pages | Page JS, all pages (gzip) | Interactive pages |
|---|---|---|---|
| counter | 1 | 453 B | 1 |
| todo | 1 | 1110 B | 1 |
| blog | 2 | 734 B | 1 |
| auth | 3 | 1526 B | 3 |
| chat | 2 | 657 B | 1 |
| showcase | 1 | 929 B | 1 |
| site | 5 | 0 B | 0 |
| dashboard | 1 | 1099 B | 1 |
| ai-chat | 1 | 985 B | 1 |
#Method
- Sizes are of minified output (the production build's token-aware minifier) compressed with gzip level 9.
- Server render time is the mean of 50 renders of the page through the same code path
pyweb serveuses, in one process, on the machine that built this site. - Compile time is a single cold compile of the source.