Collection widget shall not (fully) refresh upon data update
- July 7, 2020
- 2 replies
- 10626 views
Dear community,
in Thingworx 8.4.4. I am using Collection widget to display machine KPIs in a mashup. The contained mashup is assigned in design time and does not change in runtime. Also the number of items (= machines) is never changing, only the related KPIs. So why do I use collection widget at all? Because this is a template, rolled out to several production facilities. Within one facility the number of machines is constant but it varies between the facilities.
My original approach was to only read the structure when the mashup is loaded. Then every sub-mashup calls a Service to read and refresh the KPIs. With up to 30 and more machines the overhead becomes quite big, instead of once reading data for all machines I am reading the data for each machine one by one. This is not optimal performance wise and only once we checked the Tomcat logs and it was annoying as hell. The next multiplier is the number of users opening the dashboard. My refresh cycle is every 30 seconds, we have >30 machines and for the pilot phase 5 users let's say, that's 150 calls instead of 5 every 30 seconds.
I changed my approach to read the data only once and cascade it into the sub-mashups by Infotable parameters. It works and the network overhead is gone. I am almost happy. Please find attached two screenshots, the "fully rendered" shows an example with 21 machines, blurred because confidential data but I hope you get the idea. The "rendering" screenshot indicates the problem I have, the whole structure is rebuilding with each refresh every 30s. It does make sense as the collection widget does not know how many items it will receive, it's built to be dynamic but I don't need and don't want it in my case.
Long story short: Can I read the data only once per refresh without the collection widget rerendering every time?
I hope I am clear, let me know if you have questions. Thanks in advance.
Benny

