SNMP lag on Arduino Mega 2560 - hardware limitations or poor code?

Hello,

I am working on making a stable working configuration communication via SNMP. It works fine - there is no problem to address sensors or relays or whatever at the set OIDs. The only problem is a lag that appears sporadically. It's not limited only to the time when the sensor check occurs (which does take some resources). I ran an SNMP tester to see where my problem lies because I use a client program to access the Arduino and I had to locate on which side of the communication it was. Attached are my sketch and a log of one of the tests. It doesn't matter what OID is chosen, a repeatable SNMPGet sooner or later results in a delay of over 2 seconds.
This happens both when the test runs every 1 second or at longer periods.
Is there something I can do to prevent it, or is this a limitation of the hardware I need to keep in mind?

NEW.ino (25.6 KB)

testLog.txt (25.7 KB)