aerie icon indicating copy to clipboard operation
aerie copied to clipboard

"Update Simulation Extent" Action Abnormally Expensive

Open Mythicaeda opened this issue 1 year ago • 0 comments

When profiling streaming, I discovered that updating the simulation extent is abnormally expensive. Specifically, it is our most expensive action on develop, taking 12ms per execution. While this performance isn't urgent since sim extent updates via its own thread and DB connection, we ought to investigate why this is so expensive.

My current theory is that it's related to the action always inserting and then using an "on conflict, update" statement vs inserting at the start and strictly updating extent. This theory is because on the streaming branch, updating the profiles' durations, which is a roughly equivalent update, takes only 17microseconds per run.

Screenshot of DB Hot paths on Develop: Screenshot of DB hot spots on develop

Screenshot of DB Hot paths on Streaming image

Mythicaeda avatar Jul 18 '24 19:07 Mythicaeda