Commit 79f7d1b
perf(database): hoist invariants out of find post-processing loop
The per-result-row foreach was calling \$collection->getId() and
isset(\$this->documentTypes[\$collection->getId()]) up to three times
per iteration, even though both values are fixed for the entire find.
Compute them once before the loop.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 7622f59 commit 79f7d1b
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2385 | 2385 | | |
2386 | 2386 | | |
2387 | 2387 | | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
2388 | 2394 | | |
2389 | 2395 | | |
2390 | 2396 | | |
2391 | 2397 | | |
2392 | 2398 | | |
2393 | 2399 | | |
2394 | | - | |
2395 | | - | |
| 2400 | + | |
| 2401 | + | |
2396 | 2402 | | |
2397 | 2403 | | |
2398 | 2404 | | |
2399 | | - | |
| 2405 | + | |
2400 | 2406 | | |
2401 | 2407 | | |
2402 | 2408 | | |
| |||
0 commit comments