Hello all,
Ignition 7.9.4 user here running on 2012R2 and MSSQL 2016 R2 CU 11. I came upon interesting issue I cannot fix myself. I wanted to create a project for users to push buttons when something happens. There are currently 12 production lines and and the occurence will be tracked for all 12 lines.
The database structure is trivial - there are 8 operations per line and each operation tracks 3 actions (A,D,N). So in the DB, there is basically catalog of machines, catalog of operations, catalog of actions and “fact” table that stores what action happened on which operation in which line and when.
Now to the main problem:
I am terribly struggling with performance and the project behavior. It often happens the CPU load peaks to 100% due to Ignition designer or client running (checked through taskmgr). CPU on PC where that happens is i5-6400 4 cores.
Could the reason be I overshot with templates? On the image, each red rectangle represents one template. Count with me:
1 template instance per line - there are 12 lines
1 template instance per operation - there are 8 operations per line
1 template instance per action - there are 3 actions per operation
All the templates use template repeater - all the template repeaters query database for lines (i.e. how many lines are there and how are they called - e.g. name is put to template as parameter value), operations and actions. A,D,N represents actions and the text behind white rectangles represents operations. Covered for secrecy.
that gives us: 12x8x3 template instances in one main window = 288 template instances!
Often it happens that in the window, instead of template, there is loading progress bar running. Designer gets stuck to the extent where I have to kill it via task manager (always while hammering client’s CPU at 100% - server is basically idling around 3-7% CPU). I saw designer got stuck at “serializing window” message in the left bottom corner.
Of course the templates load some data from database (e.g. what operations are there, what actions are there and what machines are there), but these are tables with < 20 records. That cannot be the reason of my problems.
Every 180 seconds and on the window opening, I call self-made method refresh() within each template.
The “call - stack” is as follows:
line template calls refresh() for line → that calls refresh() for operation → that calls refresh() for each action (there are 3 actions per operation). The last refresh queries fact table to see what was the last action for given line and operation - based on that, some attributes are set. This refresh() chain is called upon window opening and every 180 seconds.
In case you would be missing some crucial informations about my project, I will be happy to answer further.
Take care,
SZ