|
I have kind of simple/basic question but your answer is very important to me…
I use net-snmp 5.1.2 with extended table code generated by mib2c
When I fetch single table node I get the following trace from xxx_access.c module.
Here I fetch the first column first row winpath: Ifc Get 1st <- xxx_get_first_data_point winpath: Ifc Get 0 <- get callback for the 1st column in the table
Here I fetch the first column 3rd row winpath: Ifc Get 1st winpath: Ifc Get next <-- get_next_data_point winpath: Ifc Get next winpath: Ifc Get 0
We can see that the above worked just fine but..
When I try to walk or do table get from the client I get: winpath: Ifc Get 1st winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get 0 winpath: Ifc Get 1st winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get 0 winpath: Ifc Get 1st winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get 0 winpath: Ifc Get 1st winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get 1st winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get 1 winpath: Ifc Get 1st winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get 1 winpath: Ifc Get 1st winpath: Ifc Get next winpath: Ifc Get next winpath: Ifc Get next
This is like O(k*(n^2) complexity
If I have 10 columns and 2000 rows the internal data structure will be accessed 2000*2000*10 times
I tried to trace table halper module but I need some help on that…
How can I make the scan more efficient??
Thanks
| |||||||||||||
- Re: Table Get Time Complexity O(k(n^2)) ?? Asaf Matan
- Re: Table Get Time Complexity O(k(n^2)) ?? Dave Shield
- RE: Table Get Time Complexity O(k(n^2)) ?? Asaf Matan
