FoxPro for Macintosh Performance Tips and Tricks

Last reviewed: May 21, 1996
Article ID: Q120177
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.

MORE INFORMATION

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 kbenv kbprg
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 21, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.