Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check which procedure or routine called Access method
Message
From
05/05/2021 06:23:26
 
 
To
04/05/2021 15:57:23
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01679909
Message ID:
01680142
Views:
72
>>>Sounds familiar. Looping through PROGRAM() just for listing the stack sounds not wise since we have ASTACKINFO. But here it's just about who calls a method. I guess it might not be of much influence - if, the use of ACCESS_ might be the bigger problem.
>
>If the goal includes writing to a log file, IME the overhead of writing to disk especially to a server log is likely to exceed any Program() vs astackinfo() optimization anyway. Unless the log is held open by FOPEN() or textmerge functions, additive StrToFile() can visibly slam performance in a batch scenario.
>

FWIW, I, of course, build the whole stack string and then do a single StrToFile() on each log call. But certainly true that writing to disk is the slow part here.


>I suggested Transform() purely because Program() can return multiple vartypes, risking great merriment e.g. if unexpected vartype causes error inside an error handler trying to log the error. An error inside _access would be a novelty but is easily avoided with Transform(). I suppose other options would include try...catch, or a series of vartype() tests.

Yep, if the goal is simply to avoid errors, TRANSFORM() is good.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform