xp-forge / frontend

Web frontends
1 stars 1 forks source link

Support compression when downloading #43

Closed thekid closed 10 months ago

thekid commented 10 months ago

This makes use of the https://github.com/xp-forge/compression library and improves the download speed.

Speed

Note: This is on an 16MBit DSL line (yes, I know it's 2023, looking at you, Deutsche Telekom 😊!)

Before:

$ xp bundle -f
Resolving package versions
  - Resolving npm/ol (^7.1 => 7.5.2)
  - Resolving Overpass (fonts)
  - Resolving . (local .)
Generating vendor bundle (dependencies: 3)
> static\vendor.css: 6.29 kB
> static\vendor.css.gz: 1.52 kB
> static\vendor.css.br: 1.31 kB
> static\vendor.js: 755.80 kB
> static\vendor.js.gz: 204.90 kB
> static\vendor.js.br: 167.10 kB
Bundle operations: 1 bundle(s) created in 3.774 seconds using 5716.57 kB memory

After:

$ xp bundle -f
Resolving package versions
  - Resolving npm/ol (^7.1 => 7.5.2)
  - Resolving Overpass (fonts)
  - Resolving . (local .)
Generating vendor bundle (dependencies: 3)
> static\vendor.css: 6.29 kB
> static\vendor.css.gz: 1.52 kB
> static\vendor.css.br: 1.31 kB
> static\vendor.js: 755.80 kB
> static\vendor.js.gz: 204.90 kB
> static\vendor.js.br: 167.10 kB
Bundle operations: 1 bundle(s) created in 3.420 seconds using 5794.55 kB memory

About 300ms, not a huge improvement, but I'll take it 🙂!

thekid commented 10 months ago

Released in https://github.com/xp-forge/frontend/releases/tag/v5.5.0