Skip to content

Conversation

@ryansolid
Copy link
Contributor

As requested on #553.

I'm not sure performance is any better. I didn't witness that. But on positive the new syntax really was delightful. Idiomatic array updates using spreads like immutable libraries and the bindings more inline with JSX. Really I can only think of a library or 2 that achieve the same with less written code.

@krausest krausest merged commit 886bfe6 into krausest:master May 5, 2019
@krausest
Copy link
Owner

krausest commented May 5, 2019

Thanks a lot!
Overall performance seems about the same as for 2.9.7 (but select row has improved)
Bildschirmfoto 2019-05-05 um 19 38 36
Since I still feel guilty for treating svelte so badly (#549) I'm also posting a screenshot of startup time and memory usage (where svelte looks pretty strong)
Bildschirmfoto 2019-05-05 um 19 49 50
Bildschirmfoto 2019-05-05 um 19 50 01

@frederikhors
Copy link

frederikhors commented May 5, 2019

I think we're missing something here, @Rich-Harris.

@ryansolid
Copy link
Contributor Author

@frederikhors How so? The performance gain not as much as you expected? The array reconciliation API hadn't changed as far as I could tell so that part stayed the same from implementation standpoint. Admittedly I've never touched Svelte before doing this implementation so I may have missed something.

My understanding was most of the improvements were in syntax (way cleaner I think there is only 1 or 2 libraries that do the benchmark with less implementation code) and bundle size (shaved a whole kilobyte on the implementation). Although I'd obviously love to hear Rich's thoughts.

@ryansolid
Copy link
Contributor Author

@frederikhors @Rich-Harris
I think I may have one idea. Does Svelte do implicit event delegation? In large row benchmark like this adding 2 event listeners per element has a real cost. Most libraries that don't implement implicit event delegation add some lookup code. On one side it would be a real travesty of muddying up how clean the code is, but it has real benefit on half the performance benchmarks.

@ryansolid ryansolid deleted the svelte-v3 branch May 9, 2019 08:56
@deklanw
Copy link

deklanw commented May 9, 2019

@frederikhors @Rich-Harris
I think I may have one idea. Does Svelte do implicit event delegation? In large row benchmark like this adding 2 event listeners per element has a real cost. Most libraries that don't implement implicit event delegation add some lookup code. On one side it would be a real travesty of muddying up how clean the code is, but it has real benefit on half the performance benchmarks.

sveltejs/svelte#1098

@ryansolid
Copy link
Contributor Author

@deklanw @Rich-Harris @frederikhors
I can look at adding it manually. I've done it for a number of implementations in the past. I'm just unclear what is more important to Svelte, "Less code", or "Performance". This part comes down to which best tells the story.

I might lean towards "Less Code" simply because I feel explicit Event Delegation might butcher the aesthetics of the implementation, and will only improve performance a certain amount. There are other optimizations of list reconcilliation and element creation employed at the library level that make more of a difference. If we don't hear from Rich, I will take consensus here. But I have no problem doing a few tweaks to get the performance up.

@frederikhors
Copy link

@ryansolid For what it's worth I'm on the performance side. I think @Rich-Harris will come soon here.

@ryansolid
Copy link
Contributor Author

Yeah if nothing by the weekend I will add event delegation. I wrote a medium article talking about writing this implementation and experience with Svelte. https://medium.com/@ryansolid/javascript-ui-compilers-comparing-svelte-and-solid-cbcba2120cea. Maybe this will draw someone more involved with the project out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants