Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: cubi tran
  Where is cubi tran?
 rochester
 New York - United States
 cubi tran
 Tags
Subject: RE: CPU and memory usage
Thread ID: 78970 Message ID: 78975 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Tuesday, October 11, 2005 6:01:16 PM         
   


> Currently, when my table is getting bigger, my VFP application runs slow when I have other applications run at the same time (and vice versa). I noticed that VFP use all the computer resources (especially CPU) to run so other applications have to wait. Is there any way to specify the CPU usage as well as the memory usage for the VFP?

The fact that your app runs slower when your table is getting bigger tells me that the table size is an issue. VFP allows you to grab the whole table as a cursor and while this is easy to do, sometimes it may not be the best thing to do. Try using SQL SELECT generated cursors rather than the native table generated cursors. This way you can reduce the number of records that your cpu has to deal with. In other words, if your app is slowing down with larger tables, use smaller tables in the form of cursors.

If you are already SQL generated cursors, then the next step is to split the work. Use SQL passthrough as a way to get your server doing some of the work. Anywhere you use an SQL generated cursor, you can use SQLEXEC() to have the server generate the cursor (your machine does not have to do this work.)

Give this some thought.

Ken

ENTIRE THREAD

CPU and memory usage Posted by cubi tran @ 10/11/2005 5:11:49 PM
RE: CPU and memory usage Posted by Eric den Doop @ 10/11/2005 5:15:52 PM
RE: CPU and memory usage Posted by cubi tran @ 10/11/2005 5:34:10 PM
RE: CPU and memory usage Posted by Eric den Doop @ 10/11/2005 5:39:34 PM
RE: CPU and memory usage Posted by cubi tran @ 10/11/2005 5:50:30 PM
RE: CPU and memory usage Posted by Simon Arnold @ 10/11/2005 6:24:04 PM
RE: CPU and memory usage Posted by Ken Murphy @ 10/11/2005 6:01:16 PM