forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit965d76f
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 parentc676f83 commit965d76f
3 files changed
+34
-25
lines changed| 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 | | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
| |||
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
| |||
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | | - | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
714 | 716 | | |
715 | 717 | | |
716 | 718 | | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
717 | 730 | | |
718 | 731 | | |
719 | 732 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | 119 | | |
124 | 120 | | |
125 | 121 | | |
| |||
2408 | 2404 | | |
2409 | 2405 | | |
2410 | 2406 | | |
2411 | | - | |
2412 | | - | |
| 2407 | + | |
2413 | 2408 | | |
2414 | 2409 | | |
2415 | 2410 | | |
| |||
2462 | 2457 | | |
2463 | 2458 | | |
2464 | 2459 | | |
2465 | | - | |
2466 | | - | |
| 2460 | + | |
2467 | 2461 | | |
2468 | 2462 | | |
2469 | 2463 | | |
| |||
2474 | 2468 | | |
2475 | 2469 | | |
2476 | 2470 | | |
2477 | | - | |
| 2471 | + | |
| 2472 | + | |
2478 | 2473 | | |
2479 | 2474 | | |
2480 | 2475 | | |
2481 | 2476 | | |
2482 | | - | |
| 2477 | + | |
2483 | 2478 | | |
2484 | 2479 | | |
2485 | 2480 | | |
2486 | | - | |
2487 | | - | |
2488 | | - | |
2489 | | - | |
2490 | | - | |
2491 | | - | |
2492 | | - | |
2493 | | - | |
2494 | | - | |
| 2481 | + | |
2495 | 2482 | | |
2496 | 2483 | | |
2497 | 2484 | | |
2498 | | - | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
2499 | 2488 | | |
2500 | 2489 | | |
2501 | 2490 | | |
2502 | 2491 | | |
2503 | | - | |
| 2492 | + | |
2504 | 2493 | | |
2505 | 2494 | | |
2506 | | - | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
2507 | 2502 | | |
2508 | 2503 | | |
2509 | 2504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| 485 | + | |
485 | 486 | | |
486 | 487 | | |
487 | 488 | | |
| |||
0 commit comments
Comments
(0)