[prev in list] [next in list] [prev in thread] [next in thread] 

List:       net-snmp-coders
Subject:    Re: Alternate container storage method?
From:       Stephen Hemminger <shemminger () vyatta ! com>
Date:       2010-01-26 9:27:48
Message-ID: 20100126012748.256a65d5 () nehalam
[Download RAW message or body]

On Tue, 26 Jan 2010 08:22:38 +0000
Dave Shield <D.T.Shield@liverpool.ac.uk> wrote:

> 2010/1/25 Stephen Hemminger <shemminger@vyatta.com>:
> > Some of the SNMP tables can get large (like route table), and the existing
> > table storage implementation has linear search on insert.   Has anyone
> > done an alternative that uses something smarter (tree, hash, b-tree)?
> >
> > The container class seems to be built nicely for such usage, but
> > I don't see anything smarter. Maybe binary-array?
> 
>    $ cd SNMP/52x-branch
>    $ ls snmplib/container*.c
> snmplib/container_binary_array.c
> snmplib/container.c
> snmplib/container_iterator.c
> snmplib/container_list_ssll.c
> snmplib/container_null.c
> 
> 
> Checking the code in 'container.c',   it looks as if binary_array
> is the default approach for "table_container"

But that has O(n) insert because of the duplicates check. Perhaps
for things like route table the ALLOW_DUPLICATES flag should be set.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic