Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Garbage Collection - Any Ideas?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00464933
Message ID:
00464954
Vues:
16
Hi!

I remember our customer screamed for the same reason. We made special investigation of this question. Following are conclusions.

We had an application that runs hidden in beckground process (or service) and performas automatic tasks (for example, prints scheduled documents or makes databas pack/reindex each night). This application worked quite a long time without interruptions, so memory growth problem is quite important for such king of applications too.

What we faced is that application growing quickly as it works and with our calculations it should take all available memory within 2-3 days of working. But we were wondered that it worked 1 month without interruptions! The clue here is that VFP have built-in tools for memory optimization. It uses a lot of different buffers and dynamic variable memory allocation, specially for strings. At some moment VFP starts to optimize memory and this prevents memory growth.

Another reason why memory does not really grow is also memory limitation functionality in VFP. There are certain SYS() functions in VFP that allow to define some parameters for memory management, such as buffer sizes. Probably you will find a good use for them.

RELEASE command for each variable declared as local also helps. Memory growth was redicued a lot when we made like following in each procedure:

local variable1, variable2, ...

&& do somethind...

release variable1, variable2, ...

From my experiense, usual VFP application takes 7-10 MB of memory for each instance and no way to reduce this. With many cursors opened during some complex processing our automation application reached 13-15 MB (just a busness logic functionality), but this was dropped back to 8.5 MB after data processing.

As you see, this is not so easy answer.

As about solution with Citrix - definitely it is not a good one when you have more than 50-100 users connected simultaneously and run this application. When some of users have normal computer (not a terminal), better to use usual client-server approach for them to reduce the number of users that run application on the Citrix server machine. I understand that Citrix goves a lot more security, but working with data over LAN without access from outside world is secured too, unless you expect someone will try to hack information inside of your facility.

Just a thoughts.

>I'm hoping someone knows how to force VFP to do garbage collection.
>For example, on an NT machine with task manager watching the VFP memory allocated, I type:
>
>x = space(16777184) ' VFP allocates between 20-36meg of RAM
>x = Null
>Release x ' RAM stays allocated
>
>CLOSE ALL
>CLEAR ALL ' No luck - still allocated
>
>Is there any way to force memory allocation? SYS(3050) has
>no effect on this kind of memory allocation.
>
>We have a citrix box with many VFP apps running, and if one
>user runs a VFP routine which needs RAM, the RAM is staying
>allocated to that user indefinitely, slowing the other users
>down.
>
>If anyone has any insites, I would be very thankful.
>
>TIA,
>Ed
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform