Logic Machine Forum
How to Speed up the first load in visualization (Touch)? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: How to Speed up the first load in visualization (Touch)? (/showthread.php?tid=2930)



How to Speed up the first load in visualization (Touch)? - batistacaceres - 22.10.2020

Hello
I have a LM with almost 9000 objects, 200 Plans and 300 widgets. When I start the visualization (Touch) the first load last almost 15 seconds. Once the project is loaded in the device everything run very fast, the problem is the first load.

I know that the problems is that i have put a lot of objets in all Plans and widgets, because if I delete the half of Widgets and Plans the first loading only last 5 seconds. 
Is it posible that I can choose the widgets and Plans I want to load first? The Idea is to show it to the user quicly, while in a second thread (hided for user) others widgets and plans will be loaded.

Other way could be, if I can choose what widgets or planes I want to do in first load, and the other plans and widgets dont load, and only load them if the user wants to show them.

All of this is to speed up the process of first load in the Touch visualization.

May be there is other way that I can speed up the first load, but i dont know, Could you help me please?? I know that the project is very big, and I dont want to eliminate Plans or Widgets, that is Why I ask if any one know any solution about it.

Thank you very much

best regards


RE: How to Speed up the first load in visualization (Touch)? - Erwin van der Zwart - 23.10.2020

I think you expect to much of your controller..

In projects with this size we use multiple controllers as line/zone couplers and build partial visu into the segments, in a central controller we embed / merge the partial visualizations into a single dashboards, in that scenario you have divided the load over multiple processors.


RE: How to Speed up the first load in visualization (Touch)? - edgars - 23.10.2020

Congratulations with this project, seems to be a world record! Wink If you would open dev tools in your browser you would see how big load is to open this amount of data


RE: How to Speed up the first load in visualization (Touch)? - batistacaceres - 23.10.2020

Hello team:
Thank you very much. When we have a very very good device, sometimes we lose the north, and we dont aware the limit in hardware. Thank you for advise it to us.

I have projects with less objects, much less objects, less than 800 objects but the same amount in Plans and Widgets, and it happens the same. That is why, I asked the forum if we have the chance to not load Plans and Widgets (via lua, or javascript), if we know beforehand we dont go to show them, but I want to keep the widgets and Plans inside the device. The problem is that I have several way to show the same project. I asked the forum about it, because may be there is a solution that I dont know. What I am going to do is to put two LogicMachine and each one with the same objects but diferent visualization.

Thank you very much again, 

best regards


RE: How to Speed up the first load in visualization (Touch)? - admin - 23.10.2020

There are two things that contribute to the loading time:
1. LM prepares and sends object list / visualization structure to the client
2. Client renders the plans and object controls

Switching to render on show means having to rewrite a lot of the visualization code. It will also break custom JavaScript which relies on plans / controls being ready when code is executed.

In your case you can create several users and limit their access to certain plans. This can help to speed up the loading.


RE: How to Speed up the first load in visualization (Touch)? - batistacaceres - 23.10.2020

(23.10.2020, 07:52)admin Wrote: There are two things that contribute to the loading time:
1. LM prepares and sends object list / visualization structure to the client
2. Client renders the plans and object controls

Switching to render on show means having to rewrite a lot of the visualization code. It will also break custom JavaScript which relies on plans / controls being ready when code is executed.

In your case you can create several users and limit their access to certain plans. This can help to speed up the loading.


Thank you very much, that is a very good idea.

Best regards


RE: How to Speed up the first load in visualization (Touch)? - buuuudzik - 23.10.2020

(23.10.2020, 07:44)batistacaceres Wrote: Hello team:
Thank you very much. When we have a very very good device, sometimes we lose the north, and we dont aware the limit in hardware. Thank you for advise it to us.

I have projects with less objects, much less objects, less than 800 objects but the same amount in Plans and Widgets, and it happens the same. That is why, I asked the forum if we have the chance to not load Plans and Widgets (via lua, or javascript), if we know beforehand we dont go to show them, but I want to keep the widgets and Plans inside the device. The problem is that I have several way to show the same project. I asked the forum about it, because may be there is a solution that I dont know. What I am going to do is to put two LogicMachine and each one with the same objects but diferent visualization.

Thank you very much again, 

best regards

If you have multiple widgets with iframes with schedulers/trends then you can optimize this by using below method:
https://forum.logicmachine.net/showthread.php?tid=1194&pid=7115#pid7115