- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit7c57449
committed
Avoid O(N^2) behavior when enlarging SPI tuple table in spi_printtup().
For no obvious reason, spi_printtup() was coded to enlarge the tuplepointer table by just 256 slots at a time, rather than doubling the size ateach reallocation, as is our usual habit. For very large SPI results, thismakes for O(N^2) time spent in repalloc(), which of course soon comes todominate the runtime. Use the standard doubling approach instead.This is a longstanding performance bug, so back-patch to all activebranches.Neil Conway1 parente41718f commit7c57449
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1622 | 1622 |
| |
1623 | 1623 |
| |
1624 | 1624 |
| |
1625 |
| - | |
| 1625 | + | |
| 1626 | + | |
1626 | 1627 |
| |
1627 | 1628 |
| |
1628 | 1629 |
| |
|
0 commit comments
Comments
(0)