Page MenuHomeVyOS Platform

vyos1x-config: duplicate-children check re-sorts the list on every step
Open, Requires assessmentPublicBUG

Description

Once T9374 is fixed, this check is the largest remaining part of parsing a large list: at 10,000 rules it still adds about 40 s to each commit, and it grows faster than the list.

Root cause. find_duplicate_children (src/vyos1x_parser.mly) sorts the remaining list on every recursion step, although it is already sorted after the first: O(n² log n).

Numbers (T9374 fix installed in both columns):

without this fixwith it
one parse, 10,000-rule list5.14 s0.048 s
one parse, 32,000-rule list73.7 s0.148 s
three commits, 10,000-rule list (same node)297 / 300 / 282 s257 / 259 / 246 s

Fix direction. Sort once and compare neighbours. It reports the same duplicate as before (the smallest duplicated name in sort order).

Details

Version
1.4.5, 1.5.1, rolling-2026-09-30
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)