Nigel Gomm
Programmer
a program suffers very slow loading of forms (do form) when the data is on a network drive. up to 8secs a form.
The same prog works fine as soon as i point it to use data on a local drive (0.3 secs to load the same form).
The program exe is installed on the local drive with all dll,fll and ocxs on the local drive as well.
The temp folder is local. set default and set path are both pointing to local folders only.
The form uses the default data session where all tables are already open. None of the controls on the form are bound to tables (they are bound to data objects). All tables are unbuffered and belong to a DBC.
but here's the funny thing..... set coverage isn't showing any delays; the data is being retrieved very quickly. So a form that takes 6 secs to load may show less than 2 secs of coverage. i.e. the toolbar click (level 2) may show 6secs in the coverage log but the sum of the elapsed time for instructions at the next level down (level3) adds up to only 2secs.
VFP is busy with something behind the scenes.
tried various settings of set refresh. set refresh to 10,-1 at present.
The speed seems to be related to the complexity of the form; but the issue isn't with init or refresh code in the controls. Just for fun i changed the form (edited the scx) to use the VFP parent classes rather than my baseclasses and that made no difference.
I've reduced the complexity at load as much as i can (i.e. tabs in a pageframe don't instantiate their controls till activation) but that isn't an issue when the data is local.
In the past setting PROGCACHE seemed to solve the problem (the .exe is 13.5mb with debug switched off) but recently i've noticed it not having any effect (i wonder if there was a win7 update).
both client PC and the PC with the data are win7 x64 with oplocks and smb2 switched off.
this is being seen on various networks so i think i can discount hardware.
i have
SYS(3050, 1, MIN(512*1024*1024, VAL(SYS(3050, 1, 0))))
SYS(3050, 2, MIN(512*1024*1024, VAL(SYS(3050, 1, 0))))
at startup (and have tried various other settings - thanks Olaf - recently with no effect).
the size of the program makes me think that memory is the issue but messing with progcache and sys(3050) isn't enough. Another smaller program getting its data over the same network from the same server has no such problem (albeit with a smaller dataset). This same program with a much smaller dataset over the network is still slow.
any other ideas?
This is VFP9 SP2 with a couple of the hotfixes applied (09.00.0000.5815).