Forum OpenACS Improvement Proposals (TIPs): Re: TIP #54 (Proposed) Add an adp tag to handle documenting and commenting adp files.

In ad_page_contract, the docstring isn't parsed every time

    if { [api_page_documentation_mode_p] } {
	# Just gather documentation for this page

        ad_parse_documentation_string $docstring doc_elements
        ...

Whether or not mode switching is faster using a procedure call, as above, or by passing a parameter, I don't know. But I'm sure you are not suggesting the tag run the same way every time, so information has to get in somehow. However parameter passing is the only way to allow easy configuration on a per page basis. Something like documentation_mode would query a global var, whereas other things might benefit from parameters, and some may benefit from package or site-wide settings.