Hi! Stephen added the module "nsconfigw" into the modules section, based on my example from RFE. He did quite a lot of work there lately to clean it up, debug and write some test cases.
Good Work, Stephen! I changed the way how parameters are handled to avoid excessive allocations and conversions where possible (this can still be improved). I compared the ns_config (NS built-in read-only config) speed with the new module: lexxsrv:nscp 2> time {ns_config -bool ns/parameters logdebug} 1000 3.368 microseconds per iteration lexxsrv:nscp 4> time {ns_getconfig -bool ns/parameters logdebug} 1000 2.331 microseconds per iteration Well, 1 microsec is not much but in this case this is 30% (faster). Strings is similar, yet not so large difference (as expected): lexxsrv:nscp 16> time {ns_config ns/parameters tcllibrary} 1000 3.163 microseconds per iteration lexxsrv:nscp 18> time {ns_getconfig ns/parameters tcllibrary} 1000 2.966 microseconds per iteration The config store now has typed-params so we avoid conversions similarily to Tcl objects. Per-definition, the contention on readers is minimal per-design: just one reader and one writer may contend for the same mutex. Multiple readers will never contend, except on the very first request for a param that is not privately cached. This all comes with a price of more memory usage. Not really much, but still. OTOH, you get true read/write config which is reasonably (very!) fast so you can even put calls to it in tight loops. I think this is very good now. It needs adding WideInt type and some way of making the conig persistent. Perhaps some other param qualifiers (readonly, readwrite...) Cheers Zoran ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel