debatecore / debate-tools

Battle-tested utilities to aid with Oxford format debates.
https://tools.debateco.re
GNU Affero General Public License v3.0
1 stars 3 forks source link

Don't send big data. #99

Open jakubmanczak opened 4 months ago

jakubmanczak commented 4 months ago

The way we handle our large datasets is suboptimal.

A no-cache load of tools.debateco.re means some 750 kB, thankfully able to be compressed to only 350 kB of transfer, is sent to the average client when they load the page.

A good internet connection isn't bothered by this at all. I get 250ms. However, all it takes is the perspective of a (stable!) 3G connection for it to start taking 4 seconds to load. And it's not like that's unrealistic - debates are held in many places, whether it be convention centres or spiky, concrete, brutalist Faculty of Architecture buildings that don't play nice with connectivity, like the one in Politechnika Poznańska. "Slow 3G" means upwards of ten seconds of loading time.

Out of all the action we could take in order to optimise bundle sizes, this is probably the least drastic one: let's not send unneeded data to the client.