Environment versions
Network:
Windows 2003 Server
Hi,
>The problem is that after several requerys the aplicacion suffers a gradual degradation, if I leave the screen and I enter again returns faster again, apparently the requerys or memory are consuming a lot of memory.
Windows memory allocation sometimes works strangely. Try the following with task manager a visible but not active window:
1) Switch from the window consuming too much memory and get back
2) minimize the window consuming too much memory and send it to the taskbar, then open up again
Depending on your system the amount of memory used at the moment should be trimmed, more so by option 2. If this is what you are after, you can close the window programmatically via sendmessage WINAPI or use the Windows API to do the memory reshuffling caused by minimizing the window. AFAIR the calls are named Get/SetWorkingProcessMemory or something similar. Update: see Bernard's code for the correct spelling and declaration, but keep in mind that some of the memory will be reclaimed rather fast. EndUpdate
Be sure to measure the effect on return time, as the memory sometimes needs to be reclaimed and performance might be affected negatively! I played around with it and mostly found it unnecessary to work with it, but if it helps in your situation I'ld be happy to hear about your usecase and your timing results. At least the amount of memory shown in the task manager is drastically reduced, sometimes helping with users worried about memory issues. But keep in mind that it might be just window dressing<g>.
HTH
thomas
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only