Forum OpenACS Development: Deactivating acs-automated testing for production sites
Actually, i could not reproduce this claim, but the possible gain certainly depends among other thing on the number of packages loaded. Although we should stress to increase the number of tests and the test coverage in OpenACS, it is certainly true that the regression-tests are for development and testing instances, and there should be a way to strip these from live instances.
The change requests suggests to simply remove the line in acs-bootstrap-installer/bootstrap.tcl for loading the support functions for automated testing. What about the sites that need it?
Since ages we have the function "apm_load_tests_p" in OpenACS to test whether or not testing should be used. It checks actually, whether the Package "acs-automated-testing" is enabled. So, it is easy enough to use this test as well for deciding whether the support functions should be loaded.
Furthermore more can be done than omitting the support functions: when automated testing is deactivated, there is no need to load all the tests of all packages into the blueprint. This can be as well controlled by this function.
I've made these changes in my local instance and see the following changes:
Loading with automated testing enabled: 8 seconds
[21/May/2020:13:45:12][15198.1185b85c0][-main-] Notice: nsmain: NaviServer/4.99.20a (d1eccc0dc631+) starting
[21/May/2020:13:45:20][15198.1185b85c0][-main-] Notice: nsmain: NaviServer/4.99.20a (d1eccc0dc631+) running
Loading with automated testing disabled: 5 seconds
[21/May/2020:13:42:17][15144.11f10e5c0][-main-] Notice: nsmain: NaviServer/4.99.20a (d1eccc0dc631+) starting
[21/May/2020:13:42:22][15144.11f10e5c0][-main-] Notice: nsmain: NaviServer/4.99.20a (d1eccc0dc631+) running
By disabling automated testing, the size of the blueprint went down by ~12% (8.2 MB -> 7.3 MB)
i will commit these changes in the near future to CVS.
This said, we have a procedure which decides if the site is develop or production/staging and based on the type of site sets parameters. So, if we get this change from CVS, we could „just“ disable (well more likely enable, as we move from production to develop with our database) acs-automated-testing and see these gains. Cool.