mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-27 04:54:21 +01:00
The VDBE step() function was taking Arc<MvStore> by value, causing it to be cloned on every single step of query execution. This resulted in thousands of atomic reference count increments/decrements per query, showing up as a major hotspot in profiling. Changed step() and related functions to take Option<&Arc<MvStore>> instead, passing a reference rather than cloning the Arc. This eliminates the unnecessary atomic operations while maintaining the same semantics.