Closed jsyang closed 9 years ago
Thanks a lot @jsyang. At first I was skeptical about whether the performance would not be worse (lodash has the reputation to often be faster than native), so I did a little jsperf at http://jsperf.com/html-to-vdom-lodash-vs-native
Seems like in almost all cases your PR actually improved speed. :)
Now I don't know if my test case is representative of real world use cases, but I'd say this is a pretty good sign.
The only remaining question would be whether the reduction in size is worth the missing backwards compatibility. virtual-dom
supports many older browsers, but for example mercury
does not seem to.
I'd tend to say "yes". Let those old browsers die already. ;)
Maybe we'll just leave the PR open for one or two days to see if somebody objects, otherwise I'll merge this.
Perfect, we've found the same in our user testing though I should've included a jsperf to back up the runtime performance (as you did) in my original PR comment.
Definitely +1 on letting old things go.
Nobody has complained so far, so let's do this :)
I decided to make this a patch version update after some consideration, because semver is about whether code changes are necessary for keeping the library running, and not about supported environments.
Awesome! :+1:
Hi, we're optimizing the JS load and parse times for a single page app, it would be really useful if lodash was left out of the dependency tree. I think you used lodash.each(), .map() and .reduce() for compatibility reasons? I switched them to use the Array.prototype equivalent in my fork.