LiveView DOM update patch lost

Hi,

We are building an IoT platform where we have dashboards with widgets on it. Lately we are experiencing the problem, that some widgets are not updated anymore with the asynchronous loaded data.

After hours of debugging we now found out that it seems to be related with the DOM patching. When we mount the different widgets it seems like, when the mount DOM patch is not yet applied before the update is coming, only the mount patch is applied and the update is lost, so for us the widget stays in loading state.

I hooked into the onBeforeElUpdated js event to log the sequence

In the following sequence the update (2nd log) is received before the initial DOM patch is applied. The widget stays in the initial (mounted) loading state. The log is filtered to the problematic widget only.

  • mount
  • update
  • mount patching

Current slimmed down widget that only shows true or false

When I put a process sleep in the fetching of the data, the update is received later and the following sequence shows the correct DOM patching.

  • mount
  • mount patching
  • update
  • update patching

The widget works fine when we have just a few widgets, only when we have many widgets it starts appearing.

On a side note, this started to happen after upgrading from 1.7.14 to the latest 1.7.21 but not sure if thats related ot was just by accident.