OpenChat

Front end performance overview

 

Julian Jelfs

Normal Stuff

Bundling scripts and css

Bundle splitting with dynamic imports

Minify and compress bundles

Optimise images

Lazy load as much as possible (+ low bandwidth mode)

Use appropriate cache headers

Data handling

Try not to block the UI

Only load what is absolutely necessary

Load it at the right time

Only load it once

Cache everything possible on the client

Handling updates

Updates are (relatively) slow

Don't wait for confirmation

Assume success

Compensate for failure

Merge server state with pending local updates

WebRTC

Create peer to peer connections where possible

Key updates send vie WebRTC *and* the backend

Requires STUN & TURN off-chain infrastructure

Made with Slides.com