marko-js / marko

A declarative, HTML-based language that makes building web apps fun
https://markojs.com/
MIT License
13.25k stars 643 forks source link

[Question] Marko v4 x Marko v3 - Performance #626

Closed mauricionr closed 7 years ago

mauricionr commented 7 years ago

Context

Hey @patrick-steele-idem , i'm using marko v3 in production and i'm trying to convince my team to upgrade to marko v4

I'm trying to find the performance diff between v3 and v4

Do you guys know where i can find? or do you guys have something to help me speed up this upgrade

Thanks!

patrick-steele-idem commented 7 years ago

Are you interested in server-side performance or client-side performance or both?

mauricionr commented 7 years ago

Both :rocket:

patrick-steele-idem commented 7 years ago

For server-side performance, Marko v4 is faster than Marko v3, but not by a huge margin. On the client-side, however, Marko v4 is much, much faster due to the introduction of VDOM rendering. Unfortunately, I don't have a 1-to-1 benchmark for Marko v3 vs Marko v4. What I can say is that Marko v3 is slower than React: https://github.com/patrick-steele-idem/marko-vs-react/tree/8d686de0782995d72bc26a058e84e938f0f8c2f9#client-side-rendering-performance

Marko v4, however, is much faster than React, Preact, Inferno and Vue: https://github.com/marko-js/isomorphic-ui-benchmarks

We just gave an internal talk at eBay and in the slides we talk about improvements that we made in v4 and we also have a few slides on performance: http://markojs.com/presentations/marko-v4/

I should also mention that Marko v4 includes a Marko v3 compatibility layer to allow Marko v3 and Marko v4 components to be used together. We need to do a little more work to make the transition easier, but if you are interested in going that route let us know. The Marko v3 compatibility layer does increase the page weight so migrating UI components to Marko v4 is recommended.

Hopefully that helps you convince your team to upgrade to Marko v4 :) If you need any more details let us know.

mauricionr commented 7 years ago

Really Thanks in advance @patrick-steele-idem :beers: