Smartapp Lag or not?


So I have an app that contains an eventhandler for a switch (i.e. subscribe(mySwitch, “switch”, switchEventHandler). Because thie problem is so intermittent, when an event occurs I use sendNotificationEvent to record it, mostly for debugging purposes. So here is the problem

On occasion the eventhandler triggers (based on the time of the sendNotificationEvent ) as much as 2 minutes after the fact. For instance, just recently the device (Recent) log showed an event occurred at 13:39:53. My app did not receive the same event until 13:41:21. My question is: Is this the cause of Server lag or a Smartapp problem that cant be avoided??

Multiple copies of the "Events to Event ghost" smartapp