Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: Speedup prefix-list readin by a large factor #13005

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

donaldsharp
Copy link
Member

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.

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Mar 15, 2023

Continuous Integration Result: SUCCESSFUL

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10179/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

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 <[email protected]>
@donaldsharp donaldsharp force-pushed the prefix_list_speedup branch from 0a2fbc4 to e2e8f8d Compare March 16, 2023 14:41
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10191/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@riw777 riw777 merged commit d4906f8 into FRRouting:master Mar 17, 2023
@dpward
Copy link
Contributor

dpward commented Feb 2, 2024

@donaldsharp Please see #15213 related to your change here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants