Commit e4cdf95
authored
⚡ Bolt: [performance improvement] (#88)
* ⚡ Bolt: Optimize `SessionAssertionsTrait::seeSessionHasValues`
💡 What: Retrieved the current session once before iterating through bindings, and inlined `assertTrue` and `assertSame` assertions instead of repeatedly calling `seeInSession`.
🎯 Why: Calling `seeInSession` inside a loop triggered `$this->getCurrentSession()` repeatedly, causing O(N) repetitive DI container service lookups/checks.
📊 Impact: Eliminates unnecessary overhead and memory usage during array iteration for session assertions, shaving off milliseconds in test execution time.
🔬 Measurement: Run `vendor/bin/phpunit tests/SessionAssertionsTest.php` and observe standard fast execution speeds while guaranteeing no regressions.
* Delete .jules/bolt.md1 parent 7b37157 commit e4cdf95
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
167 | 169 | | |
168 | 170 | | |
169 | | - | |
| 171 | + | |
| 172 | + | |
170 | 173 | | |
171 | 174 | | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
175 | | - | |
| 178 | + | |
176 | 179 | | |
177 | 180 | | |
178 | 181 | | |
| |||
0 commit comments