jaredkrinke / sic1

Single-instruction (subleq) programming game
https://jaredkrinke.itch.io/sic-1
Other
88 stars 3 forks source link

Compilation is very slow after switching to React... #524

Closed jaredkrinke closed 10 months ago

jaredkrinke commented 10 months ago

Some sort of infinite render loop? There's no way React is this much slower than Preact, right?

jaredkrinke commented 10 months ago

It's re-rendering at least Sic1Ide every time a byte of memory is updated (256ish times when initializing).

Preact batched updates; does React not do this?

jaredkrinke commented 10 months ago

Looks like updates are batched by default in React 18 only when using the new createRoot API.