By using brief=1 parameter in the get_count() method, we can reliably get a much faster response.
As an example, without the parameter, running 100 iterations of these count action to my cloud NetBox instance:
nb.dcim.cables.count() : average duration 0.1 sec
nb.ipam.ip_addresses.count() : average duration 0.47 sec
By adding brief=1 :
nb.dcim.cables.count() : average duration 0.075 sec
nb.ipam.ip_addresses.count() : average duration 0.343 sec
By using
brief=1
parameter in the get_count() method, we can reliably get a much faster response.As an example, without the parameter, running 100 iterations of these count action to my cloud NetBox instance: nb.dcim.cables.count() : average duration 0.1 sec nb.ipam.ip_addresses.count() : average duration 0.47 sec
By adding
brief=1
: nb.dcim.cables.count() : average duration 0.075 sec nb.ipam.ip_addresses.count() : average duration 0.343 sec