woutdp/live_svelte

Improve performance SSR rendering

Open

#36 ouverte le 27 avr. 2023

Voir sur GitHub
 (5 commentaires) (4 réactions) (0 assignés)Elixir (73 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (1 646 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

Currently SSR takes about 8ms each render in production, and about 20-40ms in dev, and this is being executed synchronously. So let's say you have 10 components inside a LiveView, it'll end up taking 80ms!

When turning off SSR it's super fast, you can easily render a 100 components and not feel any delay.

The culprit is the call to NodeJS.

Doing the following things will probably do the trick.

  • Reduce the amount of time to call NodeJS
  • Run asynchronously somehow, I'm not sure how to do this inside a HEEx template.

Maybe Bun is the answer here, or a better way of calling Node.

Guide contributeur