Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Resources
Message
De
17/07/2000 20:14:31
 
 
À
15/07/2000 22:54:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00392977
Message ID:
00393609
Vues:
15
>I have a form that contains several tabbed pages. On the majority of pages are one-to-many grids.
>
>I noticed that the refresh performance degrades severely if I have a lot of windows open outside of the application, even if the application has the focus. This is especially noticeable on grids where I have command buttons in the columns.
>
>Is there something that I can do within FoxPro to maintain good performance even with several other windows open in the background?
>Or must I warn the users not to open too many applications at the same time?
>

About the only thing you can try is to adjust VFP's use of system memory for buffering using SYS(3050), and my experience is that it will not help much - it's far more useful to limit VFP's attempt to grab buffers than to increase it. There are API calls which could be used to boost the VFP session's performance, but using them may cause more trouble than permitting Windows to define priority gives - you may starve something else whichoften is worse than having the user exit some other apps. Obviously, as the number of running apps increases, so does theuse of system assets, not just the processor itself, but availability of memory, disk access delays, and the overhead for managing contention and switching between active processes grows, even if the other process is just sitting idle. Windows gives any running app the chance to do something regularly, and must keep a portion of the app in memory at all times. Switching tasks could make the system swap memory blocks to disk so that enough real RAM is available to the active process, even if all it's doing is just waiting for the user to do something.

If you're completely suicidal:
DEFINE INTEGER SetPriorityClass IN WIN32API INTEGER ProcessHandle INTEGER dwPriorityClass
DEFINE INTEGER GetActiveProcess IN WIN32API
#DEFINE HIGH_PRIORIY_CLASS 0x80
#DEFINE NORMAL_PRIORITY_CLASS 0x20
#DEFINE IDLE_PRIORITY_CLASS 0x40
=SetPriorityClass(GetActiveProcess(),HIGH_PRIORITY_CLASS)  && more time to VFP
=SetPriorityClass(GetActiveProcess(),IDLE_PRIORITY_CLASS)  && less time to VFP
=SetPriorityClass(GetActiveProcess(),NORMAL_PRIORITY_CLASS)  && normal time to VFP
If you have problems, I don't want to hear about it. Under NT and Win2K, you need specific privileges to alter process priority for a running process. Win2K offers some additional priorities. There's a real-time priority, too; just don't use it, since you are likely to starve out everything, including Windows. See the MSDN Library, and "Advanced Windows" by Jeff Richter, for details. I really advise you do not use this to boost the priority of VFP under any set of circumstances.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform