We notice that many times the database was undersized or not properly configured. It is very important that we we use ample amount of available resources like RAM for caching underlying data (1GB). One should do health check first to see if database is configured properly. Over a period of time the shared memory gets exhausted thus causing sluggishness and often visible in the investigator as DB Stalls. Queries taking longer durations. This also applies to shared buffers which specifies how much memory is dedicated to the database.
Secondly oversized tables.
These include mostly the AT tables. (AT_EVIDENCES, AT_STORIES) and app map tables such as appmap_vertices, appmap_attribs appmap_edges etc. If these tables are huge it consumes significant amount of time retrieving from them.
Configuring query log will record the lag.
Fetching full map:
Periodic requests for ATC live mode map fetching is of two types, partial and full. Full map is requested requested when the difference between the versions is too large. If there are many changes happening then the version will be always significantly different and therefore full map is always sent. Lengthening the update interval could lead to this problem. This problem is fixed in the later versions.