Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling code in a Proc Lib is 20 times slower?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00602398
Message ID:
00602407
Vues:
18
>Someone has just told me there is a section in the Hackers guide that says calling functions in a procedure library is up to 20 times slower than just having them as programs in your app.
>
>Is this the case?

Whether it is in the hackers guide I don't know, and whether it is true at all ?
IMO the way a program is linked into an app is very similar to the procs in a procedure, and in both cases the program (proc) can be found directly. However, there may have been some changes in some VFP version according the sequence things are looked for. I'd say (without checking) that first the program is searched for in the current program (being the APP in your case), then in the attached Procedure Files, and then the path is searched. Note too, that (IMO) with lots of Procedure files attached, VFP may have to (direct) search in each of the procedures attached, and that will take time. So yes, when you'd have 40 Procedure files attached, the called program will be found 20 times slower on average opposed to being in the APP itself.

But I wouldn't bother, because even checking 20 Procedure files will be done within 0,01 sec (didn't check this, but I won't be far from it with a Ghz PC and enough memory to cache the Procedure files).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform