Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check which procedure or routine called Access method
Message
De
05/05/2021 06:23:26
 
 
À
04/05/2021 15:57:23
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01679909
Message ID:
01680142
Vues:
73
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform