The array is not large; it stores only one event for each monitor. Not even a complete event, but only a few parameters necessary for work.
I used exactly the array in which the objects are stored. This made it easier to organize access to the event. The array was iterated through "for" to eliminate unnecessary iterations. But now it doesn't matter...
The code is not much more complicated.
Ok, I'll take that into account.So maybe just treat the EventId as a string and not an integer.