- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit68a14ca
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 parent93fcb4a commit68a14ca
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1797 | 1797 |
| |
1798 | 1798 |
| |
1799 | 1799 |
| |
1800 |
| - | |
| 1800 | + | |
| 1801 | + | |
1801 | 1802 |
| |
1802 | 1803 |
| |
1803 | 1804 |
| |
|
0 commit comments
Comments
(0)