Hi,
I'm currently migrating my flows from DB1 to DB2 and mostly using UI-Templates.
Situation:
Node-Red is running on docker environment
I primarily use ZIGBEE to control my lights
the automation flows work seemless
without any Dashboard UI open, the average CPU load is less than 2%
when opening the UI-Dashboard or when switching between pages or when Reload (F5) there are long delays in displaying the UI (page is unresponsive). The CPU load spikes up-to 150%-220% for about 5-20sec
occacionally I get the below LOG error messages when the page is not responsive [info] [ui-base:DB2] Disconnected it7ep0xJqIUNtSGrAAAZ due to ping timeout [info] [ui-base:DB2] Disconnected SWU8wfVszeD-VyrDAAAP due to transport error
once the new page is loaded all the UI information are displayed and updated in realtime without any UI-errors (I checked debug-console)
as mentioned earlier , there are no error messages in the console-log for any of these pages or ui-elements
simple pages are loading fine
Some additional info:
I'm running another NR 4.0.2 instance with DB1 in container on same machine (same flows / similar UI based on DB1) .... without any disconnects or delay issues .. DB2 is only difference
I had deactivated this NR/DB1 for testing purposes with no impact (even full server restart ..just in case)
all my servers are running on 1GB unifi backbone network
I tried with wired and wifi based browser and behaviour is the same
It looks like there is a bottleneck somewhere when a new DB2 page is loaded .. especially with multiple ui-templates on it ... but I will further check
Update:
i have the Db2 dashboard loaded in 2 browser tabs on same machine ..reloading/changing the page in the 1st tab does not impact the dashboard in 2nd tab
same for browsers on 2 different machine ...no impact to others when a Db2 page is reloaded
With that chart, at what rate are new points being added to the chart? There are known issues with the performance of the chart node, It is going to be reworked I think.
the issue is only with initial load or on re-load .. this is not only for ui-chart but for other db2 elements (especially ui-template) as well.
for ui-chart im gathering 1 record every 2 seconds .. hold over 2 days max. I used that example to show the difference between initial state and after full-load (5-20sec)
I use ui-template the most and thats where I see the issue/delay/unresponiveness
Also, can you share a screenshot of your browser's network tab after the page loads? Would be interesting to see if it is a specific resource request that is causing this.
I tried to make sense of your flow but I'm afraid it escapes me. Partly because there are several node types I don't have and partly because the 1 D2 output I can see does not actually seem to make it onto my D2 output page so I can't really help understand where the issue might be.
Fron what I've seen with others, I suspect the memory leak in ChartJS for time series data is causing your problems.
We are aware of it, and hoping to switch chart providers in the near future. Massive CPU spike anytime data is injected into the chart is what we have seen consistently
The buttons are disabled by default in initial state .. they will be enabled/disabled based on the dynamic data (e.g. from the init data in the flow) provided into the ui-template
yes I'm aware of the memory leak issue for charts, which is a secondary issue for me here as I used the chart as a sample to show the behaviour.
My primary issue is with the use of multiple (8+) ui-templates with vue elements in one page as these pages often becomes unresponsive for 5-30 sec until all the data is loaded. I did provide a flow sample earlier already (see details above)
Thanks, I can take a proper look on Tuesday. I have pages with dozens of Templates on that render fine, so suspect there will be specific problem here, rather than a generalised template problem.