Performance poblem!

T

Tomer

Hi,

I've a PPC application which connects to a remote PC SQL server 2000 and
uses its DBs as its own.
The PPC is connected through an Access Point to the server.

The problem SOMETIMES begin during regular work, when the user input data
( about 1000 to 2000 records , one at a time) into the sql server database.
The PPC starts to work VERY slow( lets say about 10 times more slow), and
not just the application its self, but the whole OS (I've checked the
functionallity of the PPC after I've existed the app)
The problem normally apears at a ratio of 1:2 days and sometime can apear
several times a day.

To solve the problem the user performs a Warm boot to the PPC, and resume
the work.

It looks like some resource in still in memory, and slows the system down.

My question is how can I find that resource(if I'm currect), and deal with
it when its needed?

Tomer.
 
T

Tomer

Well, I think I've solved that problem. I've stopped using a code I found in
OpenNetCF.WinAPI, that helped get the available memory:

static OpenNETCF.WinAPI.Core.MEMORYSTATUS ms;



public static int GetFreeMemoryPrecent()

{

OpenNETCF.WinAPI.Core.GlobalMemoryStatus(out ms);

return (int)(((double)ms.dwAvailPhys/(double)ms.dwTotalPhys)*100);

}


public static string GetFreeMemory()

{

OpenNETCF.WinAPI.Core.GlobalMemoryStatus(out ms);

return

"Program Free:"+((ms.dwAvailPhys/1024)/1024)+"mb\n"+

"Program Allocated:"+((ms.dwTotalPhys/1024)/1024)+"mb";

}



Hope this helps.



Tomer.
 
B

Boris Nienke

Well, I think I've solved that problem. I've stopped using a code I found in
OpenNetCF.WinAPI, that helped get the available memory:

You mean: by just stopp using a code to get free memory (for statistic
displays or such) the machine is running better?

Do you think that the code produces "leaks" by just getting
available-memory-size?

That would be really strange :-/

Boris
 
T

Tomer

Well, running better is not quite right, because most of the time it did run
better. but every now and then the whole machine slowed down, and not just
the app.
I've figured it out when I saw in the denugger that every time I run my app
the was a sharing violation when trying to copy the opennetcf.winapi.dll.
When I've removed the declaration of the function the sharing violation got
solve, and so did the slowing problem.

Tomer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top