Commit e51bea0
Backport GCU performance optimizations from PRs #4476 and #4478 to 202405
Cherry-pick of key optimizations from sonic-net/sonic-utilities master:
- PR #4476: MD5 hash cache for validate_config_db_config, loadData dedup
via shared _loaded_sy across validator and find_ref_paths, eliminate
redundant copy.deepcopy in validation path, _validate_replace reorder
(validate added_paths first to leverage already-loaded config)
- PR #4478: BulkLeafListMoveGenerator - batches N leaf-list REMOVE ops
into a single REPLACE move, reducing DFS search space
Performance results on Cisco 8800 VOQ chassis (str3-7800-lc3-1, asic0):
Baseline (stock 202405 + VOQ_QUEUE leafref yang fix): 8m50s
With this patch: 5m59s (32% improvement, 2m51s saved)
Tested with 45-op all-add port provisioning patch (2 ports + full
networking stack: PORT, QUEUE, BUFFER_PG, PFC_WD, PORTCHANNEL, BGP)
Second run confirmed: 5m59.8s (consistent)
Functional verification:
- add operations: PASS (45-op patch applied correctly)
- replace operations: PASS (MTU change, 7-8s)
- remove operations: PASS (DEVICE_NEIGHBOR removal, 6.6s)
- End state verified: ports at correct speed, all dependent tables present
Originally merged to master as commits 5d54e44 (#4476) and bfc67f5 (#4478).
Adapted for 202405 method signatures and stock sonic-yang-mgmt (no
sonic_yang_path.py dependency, no must_size SWIG patch required).
Signed-off-by: Rithvick Reddy Munagala <rimunagala@microsoft.com>1 parent f2469f3 commit e51bea0
2 files changed
Lines changed: 99 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
147 | 157 | | |
148 | | - | |
149 | | - | |
150 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
151 | 161 | | |
152 | 162 | | |
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
156 | 166 | | |
157 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
158 | 170 | | |
159 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
160 | 176 | | |
161 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
162 | 180 | | |
163 | 181 | | |
164 | 182 | | |
| |||
522 | 540 | | |
523 | 541 | | |
524 | 542 | | |
525 | | - | |
| 543 | + | |
526 | 544 | | |
527 | 545 | | |
528 | 546 | | |
| |||
560 | 578 | | |
561 | 579 | | |
562 | 580 | | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
573 | 604 | | |
574 | | - | |
| 605 | + | |
| 606 | + | |
575 | 607 | | |
576 | 608 | | |
577 | | - | |
578 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
579 | 614 | | |
580 | 615 | | |
581 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | 853 | | |
858 | 854 | | |
859 | 855 | | |
860 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
| |||
935 | 935 | | |
936 | 936 | | |
937 | 937 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
| 938 | + | |
942 | 939 | | |
943 | 940 | | |
944 | 941 | | |
| |||
1055 | 1052 | | |
1056 | 1053 | | |
1057 | 1054 | | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
1058 | 1092 | | |
1059 | 1093 | | |
1060 | 1094 | | |
| |||
1652 | 1686 | | |
1653 | 1687 | | |
1654 | 1688 | | |
1655 | | - | |
| 1689 | + | |
| 1690 | + | |
1656 | 1691 | | |
1657 | 1692 | | |
1658 | 1693 | | |
| |||
0 commit comments