Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP Network App slow 6

Status
Not open for further replies.

psalyer

Technical User
Jun 20, 2001
30
0
0
US
I can logon any of our 300 network machines and the app runs very fast. When anyone else logs on the same machine it runs very slow. Any ideas? The app runs extremely fast in a stand alone enviroment also.
 
What level of access does your logon afford you? Sometimes system administrators have a higher level of resource allocation.
 
Is it possible that when you logon, that you don't fire up the same "background" programs? Badly configured Virus Checkers are notorius for killing network access in database programs.

Rick
 
By level of resources do you mean network space allocation on that drive?
 
We've looked at what is up and running and that doesn't have a significant impact. We're running a search using the find button in the form searhing on the same part number with the database indexed on part number. Each time we run the same part number to test the application. Almost everytime I run the search, it's fast if I logged on the machine although a couple of times now it was slow. When others log on the network and try the same search it's takes 60 seconds versus about two seconds when I run it.
 
What I meant is that on some networks the dedication of resources (CPU time) can be different for various individuals. In other words a request by the system administrator might take precedence over other users.
 
No, it runs fast for me and slow for the network administrator. I created the app, but it consists of just one form and 22k records. I have no logon utility since it is a read only database nor any secial permissions.
 
Hi
Just check the login scripts for you and the other person. Could be there is something which takes more memory for others and so dont have that much memory for VFP application. As a trial try creating another user name with equal rights as you have and login using that name and check.
You can check the available memory in VFP by creating a button with click event code to show the available memory in a window or as messagebox. The available memory can be had by the command SYS(12) and SYS(1001).
Hope this helps.
:) ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
I'm baffled -- you might post the code that you are using to do the search and see if anyone on the forum has suggestions. You haven't sold your soul to the electron queen by any chance?
 
I'm not using code in the form for the search. When I used the wizard to create the form, it creates a "find" cmd btn that you can search on any field.
 
Our network is running windows NT 4.0. I created the app on my local drive and just moved the exe, dbf, cdx and VFP dll's to the network drive.
 
Are you running the app over the network or is the application on the local machines and just the data files on the server? That might be a consideration for you. The through-put over the LAN or WAN may give you some performance issues. My personal preference has been to protect the datafiles on the server (they do daily backups) and I put the application files on the local machines along with any configuation files and their own resource file so that their local setups are maintained.

I still don't know what might be causing your differences in speed; Ramani's suggestion may be the way to approach the problem.

I haven't seen David Degrewe commenting on this forum lately but he does seem to be active on the non-visual Foxpro side and he has had some good suggestions in the past -- you might post something on the other forum and get some other perspectives.
 
Check the location of the temp directory for your login vs the slow logins. If the slow ones put their temp files on the network and yours are on a local hard drive that is probably a good part of your problem.

 
I'll check the temp directory for both logins. How can I change it to the local hard drive vs the network?
 
If it is being set by your login, something in the login script is setting the temp and/or tmp environment variable. Check with your network admin.
 
All PCs had their temp files set to go to their lcoal drive. The app was still slow for others who logged on with the antivirus software turned off. I tried RAMANI's suggestion to delete the files and the directory and then have one of the slow logons redo the directory and files. Still slow. Avialble memory was also not the cause.
So,I created two command btns for two different searches on the form. The results were almost instantaneous no matter the machine and logon. The problem has to be with the wizard created "FIND" button. Is it possible one of the properties for the find button is causing it to be slow?
 
One more suggestion/explanation.

22k records is not much, but if you have large size of a single records...

Well, imagine apps on 2 computers that try to scan the same table (perform a search). Second app started 1 second later, so first app already made a scan of, say, 2000 records. After second app start, to scan the table and read information, the Operation System at the server computer should work for both. So, when first app reads data, it switch the HDD heads to locate the record 2001. Forst than swicth to locate the record 1. Than 2002, than 2 than... As you see, HDD heads will jump around slowing down the process dramatically. This is, of course, only in case there are no buffering by the server OS.

So, the place you require to start from, is to examine the server machine OS resources to see if it is able to cache all 22K records of that table include index files. Probably OS cannot do that so HDD heads jump around to get required data sloing down the process.

If you canot manage to solve this OS/hardware problem, I would also suggest to alter the app logic so second app will wait until first app finish search.

Finally, such search is quite slow. Better do not use the Wizard, make your own search system or use some VFP frameworks. This way you can define indexes for search, search by index is MUCH more quick that will make the chanse of simultaneous search quite little.


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Lets keep this simple.

When you do try this are you on your machine or the end users?

Are you running the source coed version for testing against the compiled EXE that the user is?

__Stephen
 
I'm running compiled exe version on all machines. I've tried it from both machines which are both networked.
 
It is probably a good idea to write your own code just so that it is yours, however, that doesn't explain why the wizard code works faster for you than it does for other users. If you can get to the source code you could put some breaks and store the system time to variables so that you could narrow down where in the process the slowdown is occurring. Maybe someone on the forum can point you to where you can find the source code -- its probably buried in a class somewhere.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top