Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select statement takes 10x longer in app vs. vfp
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01137819
Message ID:
01138117
Views:
13
This message has been marked as a message which has helped to the initial question of the thread.
>Unfortunately, taking out the line you suggested (use \\linux\project\patient alias patient in 0) did nothing to decrease the time.
>
>the database from the command line is the same as the database in the program.
>
>i hear what you're saying about accessing from the server being slower the first time. i think that might have been the problem with other programs, but i am running this program directly on the server so it shouldn't have an impact.
>
>any other ideas? could it have something to do with a global setting in vfp? i'm just brainstorming here, but i also have the runtime files in the directory of the application (so that others can run it on their workstations). could it be slower accessing those files rather than directly within vfp8.0?
>
>thanks.
>
>Paul

I added code to check where the time is being spent.

Take a look at the code below, change it to suit your main program. This is you can zero in on the part of the program where the time is being spent most. After the test, you can remove the test code.
*close all && Try without the close all

set exclusive off
set safety off
SET OPTIMIZE ON
SET DELETED OFF

LOCAL lnTime as Number && Stores the time lapes

* tmpTime cursor will store the name statement ran in statement field and the time in nseconds field
CREATE CURSOR tmpTime (statement c(80),nseconds N(15,8))

m.lnTime = SECONDS() 
zoom window screen max
INSERT INTO tmpTime VALUES ("zoom window screen max",SECONDS()-m.lnTime)

m.lnTime = SECONDS() 
OPEN DATABASE d_tasks
INSERT INTO tmpTime VALUES ("OPEN DATABASE d_tasks",SECONDS()-m.lnTime)

m.lnTime = SECONDS() 
USE view_tasklist IN 0
INSERT INTO tmpTime VALUES ("USE view_tasklist IN 0",SECONDS()-m.lnTime)

m.lnTime = SECONDS() 
USE view_memolist IN 0
INSERT INTO tmpTime VALUES ("USE view_memolist IN 0",SECONDS()-m.lnTime)

m.lnTime = SECONDS() 
use \\linux\project\patient alias patient in 0 &&a table from another database that &&needs to be opened
INSERT INTO tmpTime VALUES ("use \\linux\project\patient alias patient in 0",SECONDS()-m.lnTime)

m.lnTime = SECONDS() 
do menu1.mpr
INSERT INTO tmpTime VALUES ("do menu1.mpr",SECONDS()-m.lnTime)

SELECT tmpTime
BROWSE 
*read events 
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform