Forum OpenACS Development: Re: Using "info procs" after upgrade to OpenACS 5.9.1b3 (nsf proc reform)

please refer to https://github.com/openacs/openacs-core/commit/d4a4abade442fcc39d00b493b3c6b880b75a4268 for the related changes, which happened a few years ago. Using nsf::proc improves the performance of ad_procs by a factor for 2 or three and reduces memory consumption as well (see commit message above). By using nsf::proc, the ad_procs are appearing to Tcl as commands. There is no way to make them look exactly as procs without modifying Tcl itself (or introducing a significant speed penalty). Tcl find every "proc" via "info commands"; therefore every code, that does not want explicitly to distinguish between a "proc" and a "command" should use the more general "info commands". In the case above, i would recommend to implement the "weak dependencies" via "info commads", since it probably does not matter to you, whether the function is implemented via Tcl proc or Tcl command.

In general, all code in acs-core and in the 90 supported packages is supposed to be working out of the box with and without nsf::proc (this is running since several years on openacs.org). If there are missed cases, please report via bug tracker.

The usage of nsf::proc for ad_procs depends primarily on the availability of nsf/xotcl 2.0 on your system. If a site has no xotcl 2.0 installed, ad_procs are always implemented by default as plain Tcl procs. If xotcl 2.0 (or newer) is installed nsf::procs are used when these are beneficial (e.g. when argument parsing is needed). If for some reason a site has xotcl 2.0 installed, and does not wish to use nsf::procs, please add a line "set ::acs::useNsfProc 0" to the end of your "0-acs-init.tcl" file (this could be as well made configurable via the config file).

Hope, this helps.

Thank you both for the extensive clarifications!