Middleware runs many redundant queries for users/roles/etc. on every request. The first load of this data during a request should be memoized for the remainder of the request lifecycle to avoid long query waterfalls. From inspecting traces this could save ~100ms on many requests.
Middleware runs many redundant queries for users/roles/etc. on every request. The first load of this data during a request should be memoized for the remainder of the request lifecycle to avoid long query waterfalls. From inspecting traces this could save ~100ms on many requests.