Microsoft KB Archive/321550

= How to optimize Visual FoxPro applications while using Norton AntiVirus 2002 =

Article ID: 321550

Article Last Modified on 1/25/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition
 * Microsoft Visual FoxPro 8.0 Professional Edition
 * Microsoft Visual FoxPro 9.0 Professional Edition

-



This article was previously published under Q321550



SUMMARY
Visual FoxPro applications typically open and close many table files, index files, and memo files. Because of this, you may see performance degradation when you run Visual FoxPro applications on a computer that is using antivirus software with real-time monitoring enabled. You may notice a slowdown when your application opens tables, especially when you open several tables in succession as the application starts. This article describes how to improve performance when you use applications that open tables on computers that use Norton AntiVirus 2002.



MORE INFORMATION
To optimize performance on a computer that uses Norton AntiVirus 2002, use any of the following methods.

Note These methods are listed in order of decreasing impact. Even if antivirus software runs only on the client computer or computers, the antivirus software can adversely affect performance on client computers that open tables that are located on file servers.

Method 1: Disable SmartScan in the Auto Protect options
SmartScan adversely affects performance the most, but this performance degradation is typically seen when you use tables on a network share and you are the second user or any user thereafter to open the tables. When you enable SmartScan, the first user may not see a slowdown, but the second user or every user thereafter may experience a delay of one second or more for each table to open. By default, SmartScan is disabled in Norton AntiVirus 2002.

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

304482 PRB: VFP executable file is slow to access tables on server

To disable SmartScan, follow these steps:
 * 1) Start Norton AntiVirus 2002.
 * 2) On the Options menu, click Norton AntiVirus, expand System, and then click Auto-Protect.
 * 3) Under Which file types to scan for viruses, click to select the Comprehensive file scanning (recommended) check box, and then click to clear the Scan files using SmartScan check box.

NOTE: Exclusions (see the &quot;Methood 2&quot; section of this article) do not seem to have any impact when you use SmartScan. For example, you do not improve performance when you exclude the Visual FoxPro data files or the directories that contain data files.

Method 2: Exclude the Visual FoxPro data files
You can improve performance by configuring Norton AntiVirus so that it does not scan Visual FoxPro data files. You want the exclusions to be as narrow as possible to maintain antivirus protection, but still gain performance by not scanning certain file extensions. To do this, specify the drive, the folder, and the file-name extensions of the drive and the folder that contain the data files, instead of excluding all files of a specified extension or all files in a specified folder.

For table files, you exclude :\ \*.dbf instead of *.dbf or  :\ \*.*, where   is the mapped drive, and where   is the folder that contains your table files. This excludes only those data files that your application uses. When you add each exclusion, you can include wildcard characters to include or exclude subfolders. It is best to hard-code the path and the file-name extensions to your data files only (and not include subfolders) to maintain the best balance of protection and performance.

To exclude Visual FoxPro data files, follow these steps:


 * 1) Start Norton AntiVirus 2002.
 * 2) On the Options menu, click Norton AntiVirus, expand System, and then click Exclusions.
 * 3) Click New. The Item dialog box appears.
 * 4) In the text box, type the full path and the wildcard character for table files. For example, type  , where   is the mapped drive, and where   is the folder that contains your table files.
 * 5) Click to clear the Include subfolders check box.
 * 6) To save the item, click OK.
 * 7) Repeat steps 3 through 6 for the other extensions for Visual FoxPro data files. In step 4, type K:\Data\*.cdx and K:\Data\*.fpt . If your application uses a database container, exclude the following:
 * K:\Data\*.dbc
 * K:\Data\*.dct
 * K:\Data\*.dcx

Method 3: Make the executable file and the run-time DLLs read-only
When you use this method, you may notice a small improvement in performance.

The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Additional query words: anti-virus

Keywords: kbhowto KB321550

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.