Microsoft KB Archive/120177

{| = FoxPro for Macintosh Performance Tips and Tricks =
 * width="100%"|

ID: Q120177

2.50b 2.50c 2.60a MACINTOSH

kbprg The information in this article applies to:
 * Microsoft FoxPro for Macintosh, versions 2.5b, 2.5c, 2.6a

SUMMARY
This information is also available in FoxPro's online Help system.

To go directly to this topic, choose the "Tips and Tricks" Help topic. Then do one of the following, depending on which online Help file is in use:


 * FOXHELP.HLP: Choose the "Performance Tips" jump text.
 * FOXHELP.DBF: Scroll to the "Performance Tips" heading.

Out-of-Date Index
If a table operation is returning the wrong answer, try recreating the index in case the index is out-of-date. It is best to re-create an index instead of using the REINDEX command because REINDEX does not fix a damaged index file.

Rebuild .CDX Files
Occasionally rebuild .CDX files. This can reduce the .CDX file size, thereby improving performance. When recreating .CDX tags, you should first remove the tags using the DELETE TAG ALL command.

Pack Tables and Memo Files
PACK your tables periodically. This will reduce the size of the tables and improve performance. Use the PACK MEMO command to reduce size of associated memo files, especially for tables in which you frequently make changes to memo fields.

BROWSE and SCAN Performance
To enhance the performance of BROWSE or SCAN commands, periodically SORT tables into the most frequently used order (that is, sort into the order of the most frequently used index).

Multi-Table Query Performance
To enhance multi-table queries, SORT the tables by the join condition.

Optimizing Queries
Queries are optimized when the table has no order set. Use SET ORDER TO without a tag name to remove a set order. If you have SET DELETE ON, you will need a .CDX tag on DELETED to optimize queries for that table.

Adding Records to a Table
Use the INSERT - SQL command to add new records to a table. This command provides better performance and greater integrity across a network than the combination of the APPEND BLANK and REPLACE commands.

Screen Input/Output
The SHOW GETS command is commonly used to refresh @...GET commands on screen when a change is made. Using SHOW GETS can dramatically impact the performance of applications using screens with many objects or on slower machines. Instead, consider using the SHOW GET command to only refresh the @...GET being modified instead of the entire screen.

In addition, FoxPro for Macintosh allows you to create picture buttons and check boxes by specifying a picture file. These types of controls take longer to refresh using SHOW GETS than normal text prompts.

Run Fewer Applications
Reduce the number of applications running in a Macintosh session. Macintosh is a cooperative multitasking environment. The more applications you have running, the more system resources are diverted from FoxPro.

Memory Variables
Use the #DEFINE directive in FoxPro for Macintosh to significantly reduce the number of memory variables used in your applications, saving memory.

Wallpaper Considerations
If you have limited memory, do not use wallpaper for the main FoxPro window because it requires extra memory. In addition, it impacts performance whenever the screen is refreshed.

Memory Allocation
FoxPro does not allocate memory for all of its resources when it is launched. For example, FoxPro windows are allocated from the available memory pool. Therefore, you should make enough memory available using the MEMLIMIT setting in your CONFIG.FPM file.

Additional reference words: FoxMac 2.50b 2.50c 2.6a on-line re-create multitable KBCategory: kbref kbprg KBSubcategory:

Keywords         : kbenv kbprg kbref Version          : 2.50b 2.50c 2.60a Platform         : MACINTOSH
 * }