-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hydration speed up #5108
Comments
@benmccann Looks like svelte maintainers don't want to make fast hydration... |
@lastonoga Why do you think that? |
@slimboyfats First, because PR was ready 5 months ago. And second, bad performance makes me to not use Svelte even if i like it. Thats why i made my own framework with super-fast hydration. I don't want to create bikes but what else can i do? Vue/React/Angular are very slow. |
@lastonoga But the PR isn't closed so I don't find where it's denied, can you link? |
@slimboyfats It's not denied. Simple performance question is under discussion for 5 months and thats a problem for framework progress. Vue will make new version in 6 months and it will be faster then Svelte for sure. And svelte will loose market. I did framework that has 10x faster hydration then Svelte, but has same features. It doesn't look like a problem to accept a PR. |
But I read in the issue that it might be breaking changes and that is a major thing to do. |
@lastonoga It's not a race to beat Vue, and Svelte doesn't have bad performance. this Issue is raised on the wrong project, and duplicates existing issues. Furthermore, we don't just shove in every performance enhancement, as, has been made evident in the last few days, most of them have huge glaring issues which would regress various features of the framework. We will happily accept properly considered PRs which are well written, tested, and consider every aspect of the impact of the code changing including breaking existing users of the codebase. One of the best bits about Svelte is it's simplicity, and the care taken to provide the optimal DX, instead of hammering it for performance, breaking various existing scenarios, and shifting CPU cycles to the browser, when it's already significantly faster than most other things out there. If you can't raise issues in a neutral manner without a pressure-driven doomsday scenario because we haven't acknowledged and merged your framework into ours within 24 hours, then it might be better to not raise them at all. |
I think there is a problem with misunderstanding. Let's start from the beginning.
|
@lastonoga from what I understand, the reason that we haven't made this change to hydration is that Svelte doesn't make any guarantees about what it is hydrating. Svelte will accept html from anywhere and try to hydrate it, and as far as I understand, solutions like yours require a concrete guarantee (as other frameworks) of DOM structure. So whilst it'd work in the perfect case, it'd basically break all other cases of hydration. |
@antony Got it. What about to add to svelte compiler an option like hydrationDomCheck? If flag is true then developer takes all responsibility on his own (about DOM matches guarantee). Without checking First input delay will be better. Otherwise, svelte re-render DOM as at is now. |
@lastonoga it's a possibility, I don't know the exact ins-and-outs, but it probably could be a compiler option. None of the existing PRs implement it as a compiler option currently, though, they're all-or-nothing. |
Hey, guys!
I did a work to speed up hydration step (https://github.com/sexy-framework/sexy).
And i got really good numbers (better then NuxtJS in 4.5 times and Sapper in 10 times)
And i can try to help you with it.
To make really cool FID and TTI we need to skip first hydration.
First "DOM hydration" is made by SSR, then on client side we only need to register subscribers on reactive variables and skip DOM work:
All of that we need to skip.
As i know Svelte doesn't skip it. Am i right?
The text was updated successfully, but these errors were encountered: