Calculations using the request.security() function are performed based on the data from the requested chart or timeframe before the main script executes. These calculations are independent of local conditions or the placement of calls within logical blocks on the main script and the request is processed regardless, including any log functions and their results.
This answer from TV is correct... and they are going to update the manual where it implies otherwise.
We can see that this is true, by using function, including a log entry.
f()=>
log.info("this is log")
close
... and calling it from another context
out = request.security(syminfo.tickerid, "15", f())
plot(out)
... and we see that the log is populated on every realtime tick.
So my search continues for a way to manage my original performance concern (that is to call a veryHeavyFunction from another context .... but only have it run once-per-bar (or similar) ... and not every single tick).
:-(