-
Notifications
You must be signed in to change notification settings - Fork 70
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
Todomvc jquery 03 #140
Todomvc jquery 03 #140
Conversation
What's the benefit of adopting this change or the change in #133? |
@rniwa - the other open pr adds an explicit mvc pattern to the build, which @bgrins didn't want to introduce necessarily, since a typical jQuery build probably wouldn't use it. This pr adds all the clean-up code that is beneficial to a typical jQuery build, without the additional architectural overhead. The main difference, which I think is beneficial, is the fact that this implementation doesn't re-render the whole list with every update, which is an optimization that other frameworks / libraries do out of the box. |
I agree it's a better implementation, but the primary question is which is more likely to cause performance improvements in the wild when engines optimize it, which may or may not be the more optimal implementation. It's hard to make that assessment since there's a huge range of reasonable ways to implement this, especially with jQuery and Vanilla. My general sense is that unless we have a strong reason to change it we should bias towards what was originally implemented / reviewed upstream - ofc along with version updates and basic quality like formatting, removing unused deps, etc which I (mis)understood as the focus of this alternative PR. But I can see the argument for either way. |
ah I see - the idea of keeping the original implementation is to allow the browsers to optimize for it. It feels slightly unbalanced, compared to the other workloads, which are optimized (even before the version upgrades / cleanup ), but it's more important to have consensus and move forward. |
|
ok, the last commit reverts the render update. Now this pr has the following changes:
|
FYI from a quick spot check this seems to be slower across the board with main. Is that expected (i.e. due to fixing bugs / adding missing features)? |
I reverted another change in the Handlebars template. |
alternative approach to #133
This has all the updates from the above, minus the mvc pattern.
Scores:
https://gist.github.com/flashdesignory/16bf15573fc2d33b2a79504a050e99bd
@kara