Hello, I was looking at the Sensor Monitor plugin and modified the GetItem(FQID fqid) method to add a log, because I was interested in when this was called, since I figured this method was important to have items on the maps.
The modified GetItem is as follows:
public override Item GetItem(FQID fqid)
{
EnvironmentManager.Instance.Log(false, "Sensor Monitor Sample", $"Getting Controller with FQID: {fqid.ObjectId}");
Item item = Configuration.Instance.GetItemConfiguration(SensorMonitorDefinition.SensorMonitorPluginId, _kind, fqid.ObjectId);
if (item == null)
return null;
return new ControllerItem(item);
}
What I noticed was that there are several calls being made to the Event Server when I have a Smart Client open.
The calls are basically the same, but keep repeating between Controller and Sensor items, over and over.
2024-07-01 11:35:49.739+01:00 [ 60] INFO - Sensor Monitor Sample Getting Controller with FQID: 6ad0eb21-bf67-400b-b4b2-90764d0a92be
2024-07-01 11:35:49.739+01:00 [ 60] INFO - Sensor Monitor Sample Getting Sensor with FQID: 2ad9ebac-00a2-4561-93d0-a44f124a7feb
2024-07-01 11:35:49.739+01:00 [ 60] INFO - Sensor Monitor Sample Getting Controller with FQID: 61e43569-5ef7-461b-a9d5-b578d2fd3d92
2024-07-01 11:35:49.739+01:00 [ 60] INFO - Sensor Monitor Sample Getting Sensor with FQID: 1b590499-12c5-4562-bf37-b461fcfca4a6
2024-07-01 11:35:49.739+01:00 [ 60] INFO - Sensor Monitor Sample Getting Controller with FQID: 6ad0eb21-bf67-400b-b4b2-90764d0a92be
I’m just asking since I wonder if this amount of calls can have an impact on the AppDomain memory, if I have a large amount of items created (hundreds of sensors and controllers created).
Is this normal behaviour or is there a better to get items on the map?
I’m using a 2023 R3 Professional+ version to test this.
Thanks.