On Wed, 2005-09-14 at 12:55 -0400, Robert Story wrote: > Soori> I request you to suggest other helpers to use ? > > Well, the cache helper can be added with the iterator helper > to only read in the file every N seconds,
Or "on demand" - triggered by receiving a request for that table (and the cached copy being too old). > but doesn't help that iterating over the entire data > set is needed every time. Indeed. Though iterating through an internal copy is typically much more efficient than accessing external data every time. But there's no getting away from the fact that the iterator helper isn't the most efficient approach! > The array-user and table_dataset helpers both keep the data sorted in memory, > so searching is more efficient. however, there is no mechanism to associate > the data with the file. I'm pretty sure the cache helper could be shoe-horned > in to array-used, but I'm not sure about the table dataset. Yes, it can. And the current CVS version of 'mib2c.table_data.conf' includes preliminary support for generating suitable code. (That's not included in the 5.2.x line version, though). The basic idea is to insert the cache handler "above" the table_data (or array-user) handler in the handler chain. The table_data or array-user container is used to hold this internal cache - with the cache load routine populating this from the external source (and the cache free routine releasing it again). The main table_data (or array-user) helper doesn't need to know anything about how the data was loaded (or how often) - the necessary information is simply there when it's needed. Dave ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users