"Update Simulation Extent" Action Abnormally Expensive
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 paths on Streaming