Hi all,
   I've created a new module that I'd like some comments on. It is a faster,
simpler, more secure version of Config::IniFiles, but is not intended to
replace it entirely. I'm calling it Config::DynaConf for now. It
out-performs Config::IniFiles by about 300%, and that's without using the
functions that are optimized for speed. It leaves out all of the write
functionality for security reasons. It also supports Java .properties files
and allows you to embed directives in comments that are ignored by other
applications. I have attached several documents that describe the module.
The package can found at http://www.neonedge.com/perl_tools/Config/ and
please feel free to comment.
Grant Mongardi
[EMAIL PROTECTED]
(see attached)

Attachment: README
Description: Binary data

#   compare.txt
#     Compares execution speed of Config::IniFiles to Config::DynaConf
#

Config::IniFiles
===============================================================================
$>perl -w -d:dprof IniTest.pl (WHOLE FILE)
Total Elapsed Time = -0.65838 Seconds
  User+System Time = 1.546317 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 97.6   1.510  1.878  30000   0.0001 0.0001  Config::IniFiles::val
 57.6   0.891  0.681  60000   0.0000 0.0000  Config::IniFiles::_section::FETCH
 3.88   0.060  0.049   3000   0.0000 0.0000  Config::IniFiles::Parameters
 2.59   0.040  0.060      2   0.0200 0.0299  main::BEGIN
 1.94   0.030  0.026   1000   0.0000 0.0000  Config::IniFiles::Sections
 0.65   0.010  0.010      3   0.0033 0.0033  Config::IniFiles::_section::TIEHASH
 0.65   0.010  0.010      2   0.0050 0.0050  Config::IniFiles::BEGIN
 0.65   0.010  0.010      1   0.0100 0.0100  vars::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  warnings::register::import
 0.00   0.000 -0.000      2   0.0000      -  warnings::register::mkMask
 0.00   0.000 -0.000      1   0.0000      -  vars::import
 0.00   0.000  0.010      1   0.0000 0.0099  Config::IniFiles::new
 0.00   0.000  0.010      1   0.0000 0.0099  Config::IniFiles::ReadConfig
 0.00   0.000 -0.000      3   0.0000      -  Config::IniFiles::AddSection
 0.00   0.000 -0.000      3   0.0000      -  Config::IniFiles::SectionExists

Config::DynaConf
===============================================================================
$>perl -w -d:dprof DynaTest.pl (WHOLE FILE)
Total Elapsed Time = -0.24514 Seconds
  User+System Time = 0.580747 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 101.   0.591  0.472  34000   0.0000 0.0000  Config::DynaConf::get
 22.3   0.130  0.126   1000   0.0001 0.0001  Config::DynaConf::getKeys
 1.72   0.010  0.010      1   0.0100 0.0100  warnings::BEGIN
 1.72   0.010  0.030      2   0.0050 0.0150  main::BEGIN
 1.72   0.010  0.020      1   0.0100 0.0200  vars::BEGIN
 0.00   0.000  0.020      1   0.0000 0.0199  Config::DynaConf::BEGIN
 0.00   0.000 -0.000      2   0.0000      -  Exporter::import
 0.00   0.000 -0.000      1   0.0000      -  warnings::register::import
 0.00   0.000 -0.000      2   0.0000      -  warnings::register::mkMask
 0.00   0.000 -0.000      1   0.0000      -  vars::import
 0.00   0.000 -0.000      1   0.0000      -  Config::DynaConf::new
 0.00   0.000 -0.000      1   0.0000      -  Config::DynaConf::_initialize
 0.00   0.000 -0.000      1   0.0000      -  strict::import
 0.00   0.000 -0.000      1   0.0000      -  strict::bits
 0.00   0.000 -0.000      1   0.0000      -  Config::DynaConf::AUTOLOAD

Config::IniFiles
===============================================================================
$>perl -w -d:dprof IniTest.pl (Section="Mail")
Total Elapsed Time = -0.23832 Seconds
  User+System Time = 0.624369 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 92.7   0.579  0.697  11000   0.0001 0.0001  Config::IniFiles::val
 49.6   0.310  0.233  22000   0.0000 0.0000  Config::IniFiles::_section::FETCH
 6.41   0.040  0.060      2   0.0200 0.0299  main::BEGIN
 1.60   0.010  0.006   1000   0.0000 0.0000  Config::IniFiles::Parameters
 1.60   0.010  0.010      2   0.0050 0.0050  Config::IniFiles::BEGIN
 1.60   0.010  0.010      1   0.0100 0.0100  vars::BEGIN
 1.60   0.010  0.010      1   0.0100 0.0099  Config::IniFiles::ReadConfig
 0.00   0.000  0.010      3   0.0000 0.0033  Config::IniFiles::_section::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  warnings::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  warnings::register::import
 0.00   0.000 -0.000      2   0.0000      -  warnings::register::mkMask
 0.00   0.000  0.010      1   0.0000 0.0099  Config::IniFiles::new
 0.00   0.000 -0.000      1   0.0000      -  vars::import
 0.00   0.000 -0.000      3   0.0000      -  Config::IniFiles::AddSection
 0.00   0.000 -0.000      3   0.0000      -  Config::IniFiles::SectionExists

Config::DynaConf
===============================================================================
$>perl -w -d:dprof DynaTest.pl (Section="Mail")
Total Elapsed Time = -0.10210 Seconds
  User+System Time = 0.335795 Seconds
Exclusive Times
%Time ExclSec CumulS #Calls sec/call Csec/c  Name
 56.5   0.190  0.142  16000   0.0000 0.0000  Config::DynaConf::get
 26.8   0.090  0.087   1000   0.0001 0.0001  Config::DynaConf::getKeys
 5.96   0.020  0.020      1   0.0200 0.0200  vars::BEGIN
 2.98   0.010  0.030      2   0.0050 0.0150  main::BEGIN
 0.00   0.000  0.020      1   0.0000 0.0200  Config::DynaConf::BEGIN
 0.00   0.000 -0.000      1   0.0000      -  warnings::BEGIN
 0.00   0.000 -0.000      2   0.0000      -  Exporter::import
 0.00   0.000 -0.000      1   0.0000      -  warnings::register::import
 0.00   0.000 -0.000      2   0.0000      -  warnings::register::mkMask
 0.00   0.000 -0.000      1   0.0000      -  vars::import
 0.00   0.000 -0.000      1   0.0000      -  Config::DynaConf::new
 0.00   0.000 -0.000      1   0.0000      -  Config::DynaConf::_initini
 0.00   0.000 -0.000      1   0.0000      -  strict::import
 0.00   0.000 -0.000      1   0.0000      -  strict::bits
 0.00   0.000 -0.000      1   0.0000      -  Config::DynaConf::AUTOLOAD


Reply via email to