in reply to Re: Storing a tied hash of SNMP
in thread Storing a tied hash of SNMP

Unfortunately Storable::nstore(\%SNMP::MIB) 'file' does not work, which is what I was trying to do.

Instead I've been parsing the SNMP::MIB::NODE objects and converting them to a SQLite DB file. This is working very well.

100 tests: T1 is using SNMP::MIB after calling SNMP::initMib(). T2 is using a SQLite DB in a squased FS. T3 is using the same file in ram

Totals : 685.29 74.02 74.42 Average T1: 6.8529 Average T2: 0.74 Average T3: 0.74

As you can see, using initMib and then converting 60k of SNMP objects to a DB file took me from aprox 7s down to 1s. Storeable may actually be slower.

Replies are listed 'Best First'.
Re^3: Storing a tied hash of SNMP
by perlfan (Parson) on Feb 25, 2016 at 02:39 UTC
    I was looking at the tie'd interface and it might be worth trying to extend a STORE so that it also writes to a file or database. YMMV, but all of this tie'd stuff seems like terrible core for such a module.