Commit 13e4edb
perf(database): inline authorization toggle in find to avoid per-find closure
find() built a fn () => \$this->adapter->find(...) closure and threw
it through Authorization::skip on every call, even though the only
state change skip() does is flip the status flag and restore it.
Inline the disable/restore pair around the adapter call. With the
focus bench (200x complex_query + 200x order_cursor) this drops the
remaining authorization::skip overhead and shaves another ~5%
wall time off both scenarios.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 18c0ca4 commit 13e4edb
1 file changed
Lines changed: 36 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2295 | 2295 | | |
2296 | 2296 | | |
2297 | 2297 | | |
2298 | | - | |
2299 | | - | |
2300 | | - | |
2301 | | - | |
2302 | | - | |
2303 | | - | |
2304 | | - | |
2305 | | - | |
2306 | | - | |
2307 | | - | |
2308 | | - | |
2309 | | - | |
2310 | | - | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
| 2313 | + | |
| 2314 | + | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
2311 | 2334 | | |
2312 | 2335 | | |
2313 | 2336 | | |
| |||
0 commit comments