Live data from Hacker News

Vue.js 3

github.com

11–20 of 308 posts

Re: Vue.js 3

#11
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

It's definitely not how to show that, but if you follow their link (https://docs.google.com/spreadsheets/d/1VJFx-kQ4KjJmnpDXIEai...), you'll see the numbers.

The math is like, if it did use 100mb, and now it uses 25mb, that's 300% less, because 25mb is the "100%", and you reduced by that amount 3 times. Odd.

Re: Vue.js 3

#12
post #10
post #2

Live release announcement with Evan You going on right now: https://www.youtube.com/watch?v=Vp5ANvd88x0

I didn't expect him to say "Enjoy the Vue" ha.

Programmer and dad-level humor can be a pretty deadly combination.

Re: Vue.js 3

#13
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

I'm seeing this more often, esp like 3x cheaper it hurts my head. For 120% less I'm thinking 100/220= it uses 45% of the memory it used to.

Re: Vue.js 3

#14
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

The only way this makes sense to me is if memory usage was reduced by a factor of 1.2, but that sounds so much more modest than "120% less" that I'm doubting myself.

On a related note, I tend to avoid expressing changes as percentages entirely, in large part because increasing by X% and then decreasing by that same X% doesn't get you back to where you started.

Re: Vue.js 3

#15
post #11
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

It's definitely not how to show that, but if you follow their link ( https://docs.google.com/spreadsheets/d/1VJFx-kQ4KjJmnpDXIEai... ), you'll see the numbers. The math is like, if it did use 100mb, and now it uses 25mb, that's 300% less, because 25mb is the "100%", and you reduced by that amount 3 times. Odd.

Is this the lingo that statisticians/mathematicians use?

I’d just say 75% drop for 100mb to 25mb.

Re: Vue.js 3

#16
post #7
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

Means writer isn't mathematically literate?

What's with the harsh attitude? It may have been a simple typo.

Re: Vue.js 3

#17
post #11

Earlier quoted context omitted.

It's definitely not how to show that, but if you follow their link ( https://docs.google.com/spreadsheets/d/1VJFx-kQ4KjJmnpDXIEai... ), you'll see the numbers. The math is like, if it did use 100mb, and now it uses 25mb, that's 300% less, because 25mb is the "100%", and you reduced by that amount 3 times. Odd.

Is this the lingo that statisticians/mathematicians use? I’d just say 75% drop for 100mb to 25mb.

No, I think it's just weird :)

Re: Vue.js 3

#18
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

I can only suppose it means 100% less memory consumption by Vue, and then Vue somehow frees 20% of memory from other running processes, which would lead to some pretty interesting results.

Re: Vue.js 3

#19

I don't really understand the composition API. Doesn't passing values by reference which can be modified anywhere downward the tree make your app difficult to reason and debug it?

I have a fairly large/complex SaaS platform built with Vue 3 composition API. Can maybe shed some light.

A while ago I wrote the same component in Vue 2 and Vue 3 as an example of one versus the other:

https://codesandbox.io/s/bold-shamir-uqm0b?file=/src/compone...

https://codesandbox.io/s/bold-shamir-uqm0b?file=/src/compone...

If you meant more from a conceptual standpoint -- the usage patterns with Vue 3 is pretty nearly identical for most people. You just replace "data()" property with some "reactive()" state value in setup (or "ref()" for single values).

You CAN write things like generic hooks/"useXXX()" helpers, but you likely won't wind up with a ton of those.

Also, about the reference passing: it doesn't actually really work like that. If you pass a "ref()" or "reactive()" value as a prop to a child component, and you mutate it there, it doesn't propagate to the parent.

Vue will throw this warning:

    [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "someRef"

Re: Vue.js 3

#20
post #6

> Vue 3 has demonstrated significant performance improvements over Vue 2 in terms of bundle size (up to 41% lighter with tree-shaking), initial render (up to 55% faster), updates (up to 133% faster), and memory usage (up to 120% less). What does 120% less memory usage mean, really?

In the latest JS benchmarks[1], Vue 3 RC4 is not doing so great in the startup metrics or memory usage.

Perf is on par with Preact.

RC4 is not the final release though, we'll see how it goes with 3.0.0

[1] https://krausest.github.io/js-framework-benchmark/current.ht...

Post reply on HN