Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Load forms much faster
Message
De
03/10/2014 14:46:34
Walter Meester
HoogkarspelPays-Bas
 
 
À
03/10/2014 13:56:20
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01608745
Message ID:
01608748
Vues:
113
>Hey all
>
>Let me start by saying, I've been using this technique in Visual MaxFrame a long time. I would like any extra information that I can get on this approach though.
>
>I just conducted a little experiment. I believe FoxPro obtains a file handle and then fills internal buffers when it first sees a USE command.
>
>If so, then a form with a private data session, which opens tables will take the same amount of time every time and within reason that is true.
>
>However, if I open the tables in the default data session before the private data session form loads, the form itself loads much faster.
>
>I created a simple private datasession form. The load opens the tables. The init returns .f.
>I ran a loop of 50 iterations with DO FORM. It took 120+ seconds.
>
>I then opened the tables first and re-ran the 50 iterations. It took 10 seconds.
>
>In side the form, USED() shows the files are not in use, yet clearly, the file handle and buffers were populated.
>
>So - who can state with authority, what will happen to the data, if in the private data session form, a change is made and tableupdate is run? Will the data make it physically to the file or does it hang around in the buffer?
>
>If power goes off, does the data get wiped out?
>
>Having all the tables opened, does not damage the files during a power failure in my experience. Anyone care to shed some light on this?

Can you share the code you were testing this? It does not make sense to me.
If a file is opened for the first time, it will take some time to open the files and load some buffers. The seconds time it should be much faster as on the OS level not much should happen as it is already open, whether or not the file is opened in the same or other datasession.
what happens when you do a tableupdate is also depended on whether exclusive oplocking is used. At least with SMB, it could lead to file write errors if network connection was disrupted. I had to battle this multiple times on a WAN network.

I have no idea how it works with SMB2 or later. The game might have changed somewhat.

I have no applications anymore than run DBFs on a network, so I'm not that interested in finding out.
But you could run a network monitoring tool. I've used filemon from sysinternals a lot to figure out what happens under the hood to finetune performance. Perhaps that is a good start for your investigation.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform