This is a discussion on Re: table iterator with sorted tables within the SNMP Coders forums, part of the Networking and Network Related category; On Thu, 3 Feb 2005 10:01:54 -0800 Mike wrote: MT> If table interator helper is used to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Thu, 3 Feb 2005 10:01:54 -0800 Mike wrote:
MT> If table interator helper is used to access sorted tables, a small MT> change in netsnmp_table_iterator_helper_handler() can greatly improve MT> performance. Giving the get_first_data_point function access to the MT> indices from the request (i.e. it is passed the MT> netsnmp_table_request_info *) the function can begin the search starting MT> from the index values and not from the first entry as currently MT> required. This can be done by setting the callback_loop_context to MT> table_info before the call to get_first_data_point. No change is MT> required in function definition. It should have no impact on existing MT> get_first_data_functions which only set callback_loop_context. MT> MT> if (iinfo->flags & NETSNMP_ITERATOR_FLAG_SORTED) { MT> callback_loop_context = table_info; MT> } MT> index_search = MT> (iinfo->get_first_data_point) (&callback_loop_context, MT> &callback_data_context, MT> index_search, iinfo); MT> MT> Comments? Interesting idea. Seems reasonable to me. Wes? I'd say submit it as a patch so it doesn't get lost... -- Robert Story; NET-SNMP Junkie Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders |