From e2e8f8dd5136af2eada315c2f4060d2bae6a8694 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 15 Mar 2023 13:51:19 -0400 Subject: lib: Speedup prefix-list readin by a large factor Reading in prefix-lists is reading in the specified prefix list and validating that the prefix is unique 2 times. This makes no sense. Relax the requirement that a prefix list can limit this as well as completely remove this check. Validation then just becomes does this prefix-list specified actually make sense and that is taken care of by the the cli code. Reading in prefix-lists was looking for duplicate prefixes 2 times instead of doing it just one time. Let's just not do it at all. By doing this change, The code changes from never completing for a 27k long prefix-list to taking just under 30 seconds, with 4 daemons processing this data. Signed-off-by: Donald Sharp --- lib/filter_cli.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib/filter_cli.c') diff --git a/lib/filter_cli.c b/lib/filter_cli.c index 7ef0d47f67..07dd939f71 100644 --- a/lib/filter_cli.c +++ b/lib/filter_cli.c @@ -1272,9 +1272,6 @@ DEFPY_YANG( pda.any = true; } - if (plist_is_dup(vty->candidate_config->dnode, &pda)) - return CMD_SUCCESS; - /* * Create the prefix-list first, so we can generate sequence if * none given (backward compatibility). @@ -1476,9 +1473,6 @@ DEFPY_YANG( pda.any = true; } - if (plist_is_dup(vty->candidate_config->dnode, &pda)) - return CMD_SUCCESS; - /* * Create the prefix-list first, so we can generate sequence if * none given (backward compatibility). -- cgit v1.2.3