Skip to content

Commit

Permalink
yang: use relative path instead of absolute one for route-map
Browse files Browse the repository at this point in the history
Using absolute xpath is not optimal for finding the target node. As the
route map configuration grows, the yang validation will take more time
to complete. Relative paths are much faster.

Tested with a config file that contains ~3k route map config lines.
- before:
time cat conf | vtysh
configure
log syslog errors
router bgp 65000
!
route-map RM:BGP:VPNV4:PEER:VRR9:IN10001 permit 101
 match community CL:HCC:PATH_PRIO1_EAST1
  set local-preference 15200
!
...
route-map RM:BGP:VPNV4:PEER:VRR9:IN10001 permit 1182
 match community CL:HCC:PATH_PRIO1_EAST1082
 set local-preference 16281
!

real    13m51.500s
user    0m0.522s
sys     0m4.854s

- after:
time cat conf | vtysh
...
real    0m48.390s
user    0m0.384s
sys     0m1.245s

Signed-off-by: Loïc Sang <[email protected]>
  • Loading branch information
Loïc Sang committed May 29, 2024
1 parent f8abf96 commit f1ea52b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 52 deletions.
Loading

0 comments on commit f1ea52b

Please sign in to comment.