Hacker News new | past | comments | ask | show | jobs | submit login

[flagged]



It is absolutely not bait. Declarative programming for the web is certainly more pleasant, but direct DOM manipulation will always and forever have a performance upper hand over rendering frameworks that sit atop the DOM. Now this performance difference is usually negligible, but for projects like VSCode or this, there’s a very good reason they aren’t written using frameworks.


Depending on how you do rendering, vanilla JS can be extremely fast.

For most web apps, the initial layout and rendering take the biggest portion of the rendering budget. Subsequent changes are minimal and can be rendered very fast. If you can avoid re-rendering the whole page for every little change, the update can be fast.

React's advantage is to track the changes for you. That doesn't mean you can't track the changes yourself. And if you structure your rendering and refreshing pipelines correctly, vanilla JS would do just fine if not better.


Controlling DOM updates yourself will always allow for best performance.

Virtual DOM still needs to reconcile and apply DOM updates, but since this is handled by your UI framework of choice you have limited ability to optimize these updates.

See benchmarks: https://krausest.github.io/js-framework-benchmark/current.ht...

I would argue that if performance is your top concern you'd still be better off using a framework like SolidJS, but theoretically JavaScript and JQuery can be better optimized.


Are we seeing the same benchmark? On that site, both Vue and Svelte are extremely close/on-par with Vanilla JS on every benchmark except the transfer size and first paint (which shouldn't matter at all here). jQuery also has an overhead, and I wouldn't be surprised if it's larger on many benchmarks than, say, Svelte's.


Yes, modern frameworks are getting very good. This does not change the fact that abstractions around DOM updates (frameworks) limits your ability to maximally optimize performance. The output of frameworks is still vanilla js.


your post is bait, react more performant than vanilla JS + jQuery? you gotta be kidding me


Yep, jQuery isn't an obvious choice if you want performance:

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


jquery isn't on that list


Technically, when you use Vanilla JS these days, it is mostly like jQuery since most if not all things have been migrated from jQuery to Vanilla JS :)




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: