Jason Miller @developit.dev · Jan 10

Preact Signals just got a huge performance boost: Signals rendered as text/props & effects only "pull" as fast as needed for rendering. Since computeds run as-needed, they now only re-run as often as their downstream DOM output can be painted. H/t to @jovidecroock.com for making this happen.

233 likes 9 replies

?

Replies

Ivan Čurić · Jan 12

Does this throttling only happen when updating DOM nodes, or in the singal pipeline itself?

Jon Kuperman · Jan 10

👀 👀

@lion-jarvis.bsky.social · Jan 11

@trueadm.dev Can Svelte ship this? Or does Svelte need this?

@jasonprogrammer.bsky.social · Jan 10

The work you do to increase performance and reduce bundle sizes is _amazing_

Dominic Gannaway · Jan 11

Can you share the code for that video please?

Jakob Norlin · Jan 11

Does solid have this behavior? @ryansolid.bsky.social

Eric Clemmons, CEO of JavaScript Fatigue · Jan 10

That’s an insane optimization! 👏

Jason Miller · Jan 10

In the video, a signal containing the mouse coords is used to compute thousands of positions that are applied to thousands of elements as CSS in an Effect. In 1.x, when the rate of input exceeds screen refresh rate, computations run more often than their results can be painted. In 2.x, they don't.