Forum OpenACS Development: ad_proc/ad_library docstrings

Collapse
Posted by Roberto Mello on
I've brought this up before, can't remember when.

By default all the ad_proc/ad_libray documentation is cached in nsv sets. I've done some poking through nscp and found that the nsv's defined in 00-proc-procs.tcl use this much (in bytes):

[01/Oct/2004:16:25:09][20459.98311][-nscp:1-] Notice: Total in proc_doc: 326375
[01/Oct/2004:16:25:09][20459.98311][-nscp:1-] Notice: Total in api_library_doc: 37178
[01/Oct/2004:16:25:09][20459.98311][-nscp:1-] Notice: Total in proc_source_file: 125515
[01/Oct/2004:16:25:09][20459.98311][-nscp:1-] Notice: Total in api_proc_doc_scripts: 53180
[01/Oct/2004:16:25:09][20459.98311][-nscp:1-] Notice: Total in api_proc_doc: 1107167
[01/Oct/2004:16:25:11][20459.98311][-nscp:1-] Notice: Total: 1649415

So about 1.7 MiB total. Some of the info in those nsv's is store twice. Here's what my digging turned out:

proc_doc -> docstrings
api_library_doc -> Metadata about a library: creation-date, etc.
proc_source_file -> Path to file containing proc. Derivable from prepending SERVERROOT/{api_proc_doc -> proc -> script}
api_proc_doc_scripts -> procs in a file
api_proc_doc -> All ad_proc info about a proc, including path.

I didn't dig deep enough to find out if the info stored in these is used anywhere else other than the api-browser.

While 1.7 MiB isn't much, for people doing hosting, on a production machine, it's 1.7 MiB that is rarely used.

Should we have a param that controls whether this is stored or not?

-Roberto

Collapse
Posted by Jade Rubick on
That sounds like a good idea to me, Roberto. On a dev server, you can switch the caching on; otherwise, I think it should be off by default.
Collapse
Posted by Andrew Piskorski on
OpenACS certainly should have a simple config switch to stuff the doc data into nsvs or not. I don't see how that could hurt anything. But probably best to default it to the current "on" behavior.