SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

Question: how to implement virtual dom for ui5? #1629

Closed hatelove85911 closed 5 years ago

hatelove85911 commented 7 years ago

I'm bothered by the low rendering performance of ui5 controls.

So I'm trying figure out a way to improve it, I guess the problem is that ui5 rerender the whole control everytime a property or aggregation changes, and the rerender happens to the real dom.

It's similar to react, but react use virtual dom to solve this problem.

If I'm targeting to make ui5 render using virtual dom, could you kindly point me to the best possible direction?

  1. the most relevant part is the renderManager I guess?
  2. onAfterRendering using jquery will have problem?
EdwinBoos commented 7 years ago

Any updates on this?

I have the same issues with performance, especially on Tablet and Mobile phone. In my opinion it is time to move for vdom, and would finally make me happy.

terezamch commented 6 years ago

Hello,

Is this question still relevant?

King regards, Tereza

hatelove85911 commented 6 years ago

yes, No support from the library maintainer yet.

Shtilianova commented 5 years ago

Hello @hatelove85911 , I've created an internal incident 1880717419. The status of the issue will be updated here in GitHub. Regards, Diana

goligo commented 5 years ago

This is not a bug, there is no point tracking this as an incident. As UI5 does use string based rendering, there is no easy path to virtual DOM. Instead to increase performance, you can implement custom setters, which do fine grained DOM update, instead of full rerendering of controls.

boghyon commented 5 years ago

@hatelove85911 I agree with you about the current performance in general. But I think UI5 is heading to the right direction.

In one of the podcasts, @petermuessig was mentioning that they'd be experimenting with lit-htmlvid which would also work great with web components. Not sure what the current state is internally, but I believe DOM manipulation is still one of the main target areas to improve in terms of UI5 evo.

the problem is that UI5 rerenders the whole control every time a property or aggregation changes

Till now, control developers could suppress invalidation and instead pinpoint DOM parts manually to apply the updates without rerendering (As demoed by @akudev). But with the recent semantic APIs and the Patcher, it looks like we don't need to do it anymore.. (Please correct me if I'm wrong).

and the rerender happens to the real dom

I'm not sure if that's really a bad thing. VDOM also needs to touch the real DOM at some point.
I think, if done efficiently, UI5 can go well without VDOM and might be even faster than let's say React when doing the same task (no diffing, no VDOM overhead, etc.) *


* Update: it actually does diffing but achieves 60 fps easily compared to previous string-based rendering. Thank you for your awesome work @aborjinik!