Forum OpenACS Q&A: Re: Down to < 60 seconds
after looking more deeper into the code, i see what you mean. The apm-loader is quite dumb and is based on the assumption that load more or less everything and filters later on. However, one can do better than what the above check does: instead of loading all files int the directory www/resources and filter these, one can already filter on the directory and avoid scanning all these files at all.
But there seems to be more useful, since several of the operations scan the files, and it is not useful to scan e.g. .zip files, or .java, etc. Furthermore, acs-lang was loaded twice.
Since the files are scanned several times during startup, it seems worth to speed it up (see my commits of today). On my test machine, some of the apm_load* operations are up to five times faster than before. The code is still straightforward. In case my filtering was too aggressive (e.g. on file extensions), it can be easily made more/less aggressive.
Before the change: startup time 14 secs
[02/Apr/2013:17:24:44][32182.7f763a747780][-main-] Notice: nsmain: NaviServer/4.99.5 starting [02/Apr/2013:17:24:58][32182.7f763a747780][-main-] Notice: nsmain: NaviServer/4.99.5 runningAfter the change: startup time 9 secs
[04/Apr/2013:12:11:36][8407.7ff48ba4c780][-main-] Notice: nsmain: NaviServer/4.99.5 starting [04/Apr/2013:12:11:45][8407.7ff48ba4c780][-main-] Notice: nsmain: NaviServer/4.99.5 running
It should work now if you apply that last commit.
I double checked and all scripts within the sql/upgrade directory were being unintentionally ignored.