Community discussions

MUM Europe 2020
 
legrang
just joined
Topic Author
Posts: 22
Joined: Wed Nov 03, 2010 4:05 pm
Location: South Africa
Contact:

Bad API performance on /ip/route/print

Thu Aug 24, 2017 5:08 pm

Hi

I'm working on an application that uses /ip/route/print through the RouterOS API to gather some routing table data. The performance of this operation is really bad, and it seems to diminish geometrically as routing table size increases. For example, on the command line the following command is basically instantaneous:

/ip route print detail where bgp=yes dst-address=192.168.0.0/20

But doing the similar command using the API on a CCR 1016 takes 35 seconds on one box, and 150s on another (which carries a larger routing table).

I speculate that there is an implementation difference between the command line and the API that causes the former to efficiently filter the data while the latter does a scan of the whole table.

Any thoughts or ideas?
Gideon le Grange
RouterOS Java API: https://github.com/GideonLeGrange/mikrotik-java

Who is online

Users browsing this forum: No registered users and 15 guests