Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
winphone1974
on Nov 11, 2021
|
parent
|
context
|
favorite
| on:
Rich Harris joins Vercel to work on Svelte full ti...
The key is used by the shadow Dom for update performance; the is no shadow Dom in svelte
alserio
on Nov 12, 2021
|
next
[–]
List diffing is done even in svelte at runtime. Keys are used the same way as any other frameworks or frontend libraries, virtual DOM or reactive.
afavour
on Nov 11, 2021
|
prev
[–]
And yet Svelte is faster than React in pretty much every benchmark I’ve seen.
patrickthebold
on Nov 12, 2021
|
parent
[–]
That makes sense though right? One would assume that shadow dom and dom would be slower than direct dom manipulation.
thinkloop
on Nov 12, 2021
|
root
|
parent
[–]
I'm not sure that's a fair assumption, one of the original sells of a shadow dom was that manipulting the dom directly is extremely slow, so doing as much work away from it is faster.
ttfkam
on Nov 14, 2021
|
root
|
parent
[–]
Because React's model requires tracking the entire DOM tree for changes and rewriting whole branches where a change is detected.
Svelte bypasses the whole problem for the most part.
https://youtu.be/AdNJ3fydeao?t=247
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: