Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Sorting orders based on their price achievability takes a surprisingly long amount of time. # Changes Used `sort_by_cached_key()` to speed up sorting from ~1.5s to ~0.2s (prod mainnet auction). Note that unlike fetching balances this currently has to happen for every configured driver. Meaning that when an auction starts we slam the `driver` pod with >10 200ms tasks at the same time. As an additional optimization step specifically for multiplexing solvers we should find a way to deduplicate this work as well. But this should happen in another PR. I also used `spawn_blocking()` to run the sorting task since regular tokio tasks are not supposed to be blocked for more than 100µs according to this [blog article](https://ryhl.io/blog/async-what-is-blocking/) (although I'm not sure whether these numbers are still accurate since the tokio runtime started to keep track of every task's compute budget). ## How to test e2e
- Loading branch information