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
- 48,010 B shared runtime, minified
- 15,323 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 | 296 B | 15619 B | 377 B | 35.1 ms | 0.044 ms |
| todo | 22 | 449 B | 15772 B | 421 B | 2.5 ms | 0.047 ms |
| blog | 9 | 0 B | 0 B | 291 B | 0.8 ms | 0.039 ms |
#Example apps
| Example | Pages | Page JS, all pages (gzip) | Interactive pages |
|---|---|---|---|
| saas | 3 | 4782 B | 3 |
| counter | 1 | 1223 B | 1 |
| todo | 1 | 2351 B | 1 |
| ui | 1 | 10331 B | 1 |
| blog | 2 | 2184 B | 2 |
| auth | 3 | 3487 B | 3 |
| chat | 2 | 2166 B | 2 |
| showcase | 1 | 931 B | 1 |
| site | 5 | 0 B | 0 |
| dashboard | 1 | 3890 B | 1 |
| ai-chat | 1 | 1570 B | 1 |
| desktop | 1 | 1478 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.