Commit 2dcadd4
committed
Speed up summary truncate replacement logic
This was calling strlen on every iteration of the loop, causing
excessive runtime on deeply nested queries (e.g. hundreds of UNION ALL).
In passing, make explicit an assumption that the replacement string is as
long, or shorter, than the pattern we're matching against.1 parent 180ef56 commit 2dcadd4
1 file changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
290 | 291 | | |
291 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | | - | |
296 | | - | |
297 | 298 | | |
298 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
299 | 307 | | |
300 | 308 | | |
301 | 309 | | |
| |||
0 commit comments