Community discussions

MikroTik App
just joined
Topic Author
Posts: 23
Joined: Wed Nov 03, 2010 4:05 pm
Location: South Africa

Bad API performance on /ip/route/print

Thu Aug 24, 2017 5:08 pm


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=

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:

Who is online

Users browsing this forum: Baidu [Spider] and 13 guests