Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why normal processing slow down my system
Message
From
31/12/2001 17:11:24
 
 
To
27/12/2001 23:48:08
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00598634
Message ID:
00599511
Views:
24
>Hi,
>
>Actually, my application need to be run on my client standalone PC
>for 24 hours x 7 days on Win9x system in a network environment.
>
>After a few days like 4 days, we observed the system clock is
>out by 15 - 30 minutes, so we often had to adjust it back on time.
>In addition, the system will also reported of 'illegal operation'
>and exit my application.
>

What's happening is probably that you're running a tight loop, and VFP is not responding to the timer events because it never interacts with Windows. You might try adding a DOEVENTS() to your code, to allow VFP to respond to windows messages queued to the Form hWnd or thread message queue, forcing VFP to release control to the Windows kernal at a regular, frequent interval. You also might consider coding your app to respond to events in the folder of interest via FindFirstChangeNotification() and it's related calls; try looking up Monitoring Changes in a Directory or Directory Tree. in the MSDN documentation (C code) or Dan Appleman's first book on using the WinAPI with Visual Basic for a similar example in VB.

Coding in VFP will need something like Christof Lange's STRUCT class or my ClsHeap class to manage memory issues, and the calls rely on Unicode data representations, so you'll need to convert strings using the STRCONV() function. I would strongly recommend against the use of any Win9x variant for the application; it's far more fragile in these types of settings. 2K or XP Pro are far more proficient.

>We also observed during the unzipping and processing of
>database file, the whole system seem to 'halt', other program
>also seem to 'halt' too on the same PC, but will restore back to normal once
>the processing is over. Normally, there are 50 zip files to process every day which might take half an hours to process all of them. Next, the
>memory resources of the system also seem to getting lesser, like
>memory leakage in my application.
>
>The system is a Pentium III, 450Mhz with 64M of RAM
>on Win98.


Bad choice of OS, and far too little RAM, IMO. Trying to cheap it out will cause all sorts of headaches.
>
>Therefore, I suspect the processing process is causing my
>system clock to slow down and memory leakage in my application
>is causing the illegal operation.
>

It's possible, but I think you don't have a handle on the processing environment and Windows internals.

>I don't use DOEVENTS in my application at all, but do use
>AutoYield as my unzipping feature is using Dynazip, which
>required setting the AutoYield to work.
>

Try launching a separate process to handle the task of unzipping.

>I also had restrict my application RAM usage using
>SYS(3050) but it didn't help.
>

I don't think you are aware of what exactly is managed by SYS(3050) WRT your app.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform