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

 

 

 

 

Asaf Matan
 

Wintegra TM
6,
Hamsager Street
P.O.B. 3048
43653 Ra’anana

[EMAIL PROTECTED]
www.wintegra.com

tel:
fax:

+972-9-7439998#230
+972-9-7439992

 

 

 

 

Reply via email to