> From: Dave Shield > Sent: 09 July 2004 09:38 > > The data I am accessing is in a shared memory area. It is > > already ordered but might have gaps in it (ie. some rows > > might be missing). > > The gaps are no problem, but the iterator helper doesn't > assume that the list is sorted properly, so will look through > the whole thing for each individual request (which is partly > why you're seeing so many calls) > You can improve this behaviour by setting a flag when you > first register the table. Something like: > > netsnmp_iterator_info *iinfo = > SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info); > iinfo->flags |= NETSNMP_ITERATOR_FLAG_SORTED; > // set up as before > netsnmp_register_table_iterator( reg, iinfo ); > > > It's still not the most efficient of helpers, but that should improve > matters (particularly for the earlier entries in the table). > > Dave > >
Dave, setting the NETSNMP_ITERATOR_FLAG_SORTED reduced the calls to get_first_data_point and get_next_data_point from 58080 down to 29520 times (that's for a table with 4 accessible columns and 120 rows). Maybe I'll try the netsnmp container based handlers (as Robert suggested) sometime but for the time being I'll leave it as it is. Thanks for the Help Holger ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Net-snmp-users mailing list [EMAIL PROTECTED] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users