forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1a93588
committed
Use binary search instead of brute-force scan in findNamespace().
The previous coding presented a significant bottleneck when dumpingdatabases containing many thousands of schemas, since the total timespent searching would increase roughly as O(N^2) in the number of objects.Noted by Jeff Janes, though I rewrote his proposed patch to use theexisting findObjectByOid infrastructure.Since this is a longstanding performance bug, backpatch to all supportedversions.1 parent4615d2c commit1a93588
3 files changed
+34
-24
lines changedLines changed: 16 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
53 | 54 |
| |
54 | 55 |
| |
55 | 56 |
| |
56 | 57 |
| |
57 | 58 |
| |
| 59 | + | |
58 | 60 |
| |
59 | 61 |
| |
60 | 62 |
| |
61 | 63 |
| |
62 | 64 |
| |
| 65 | + | |
63 | 66 |
| |
64 | 67 |
| |
65 | 68 |
| |
| |||
83 | 86 |
| |
84 | 87 |
| |
85 | 88 |
| |
86 |
| - | |
87 | 89 |
| |
88 | 90 |
| |
89 | 91 |
| |
| |||
103 | 105 |
| |
104 | 106 |
| |
105 | 107 |
| |
106 |
| - | |
| 108 | + | |
| 109 | + | |
107 | 110 |
| |
108 | 111 |
| |
109 | 112 |
| |
| |||
734 | 737 |
| |
735 | 738 |
| |
736 | 739 |
| |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
737 | 751 |
| |
738 | 752 |
| |
739 | 753 |
| |
|
Lines changed: 17 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 | 129 |
| |
134 | 130 |
| |
135 | 131 |
| |
| |||
2619 | 2615 |
| |
2620 | 2616 |
| |
2621 | 2617 |
| |
2622 |
| - | |
2623 |
| - | |
| 2618 | + | |
2624 | 2619 |
| |
2625 | 2620 |
| |
2626 | 2621 |
| |
| |||
2673 | 2668 |
| |
2674 | 2669 |
| |
2675 | 2670 |
| |
2676 |
| - | |
2677 |
| - | |
| 2671 | + | |
2678 | 2672 |
| |
2679 | 2673 |
| |
2680 | 2674 |
| |
| |||
2685 | 2679 |
| |
2686 | 2680 |
| |
2687 | 2681 |
| |
2688 |
| - | |
| 2682 | + | |
| 2683 | + | |
2689 | 2684 |
| |
2690 | 2685 |
| |
2691 | 2686 |
| |
2692 | 2687 |
| |
2693 |
| - | |
| 2688 | + | |
2694 | 2689 |
| |
2695 | 2690 |
| |
2696 | 2691 |
| |
2697 |
| - | |
2698 |
| - | |
2699 |
| - | |
2700 |
| - | |
2701 |
| - | |
2702 |
| - | |
2703 |
| - | |
2704 |
| - | |
2705 |
| - | |
| 2692 | + | |
2706 | 2693 |
| |
2707 | 2694 |
| |
2708 | 2695 |
| |
2709 |
| - | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
2710 | 2699 |
| |
2711 | 2700 |
| |
2712 | 2701 |
| |
2713 | 2702 |
| |
2714 |
| - | |
| 2703 | + | |
2715 | 2704 |
| |
2716 | 2705 |
| |
2717 |
| - | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
2718 | 2713 |
| |
2719 | 2714 |
| |
2720 | 2715 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
| 509 | + | |
509 | 510 |
| |
510 | 511 |
| |
511 | 512 |
| |
|
0 commit comments
Comments
(0)