Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to speed up an EXE
Message
 
À
14/07/2004 16:42:54
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00922944
Message ID:
00924560
Vues:
32
Hi Charlie.

Thanks again for you very thorogh reply.
I'll give thia a go over the next few days and let you know.
Regards,

Gerard


>Hi Gerard,
>Just do this simple test and let me know the results.
>
>
>TableName = "SomeTable"
>DataDir = "O:\SomePath\"
>* To get a consistent caching effect from the server.
>USE (m.DataDir + m.TableName)
>USE
>
>Timer = SECONDS()
>USE (m.DataDir + m.TableName)
>FirstTimeUse = (SECONDS() - m.Timer)
>
>* First test with this line commented, then uncomment.
>*USE
>
>oSession = NEWOBJECT("SessionBase")
>
>Timer = SECONDS()
>oSession.Use(m.DataDir + m.TableName)
>SecondTimeUse = (SECONDS() - m.Timer)
>oSession.Release()
>? "First time USE took "+ STR(m.FirstTimeUse,6,4) + ", and 2nd time took " + STR(m.SecondTimeUse,6,4)
>
>
>DEFINE CLASS SessionBase AS Session
>   PROCEDURE Use(TableName)
>      USE (m.TableName)
>   PROCEDURE Release
>      USE
>      RELEASE This
>ENDDEFINE
>
>
>For me this is as I remembered--any time the table is used in some datasession, the next use is fast--essentially a USE AGAIN.
>There's no reason to care about whether tables are open at the menu. The only concern should be updating tables. I only update though local views, which do a USE AGAIN implicitly once more when they update each row--and close the alias they used (all unbeknownst to you).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform