G
Guest
Hi,
Basically, I have developed an app to run on the .Net Compact framework (on
Pocket PC 2002) which among other things using SQL CE Replication, reads
other info in from various config files, creates each form dynamically (this
was part of the customer spec), and holds all the user entered info in a
single data class.
The problem I am seeing now though is that when the app is first started it
has a fast performance, and the forms are created and displayed very quickly.
However, after some time of using it, the app slows down noticeably to the
point where forms take up to 5 seconds to be displayed, and presumably the
back ground code is progressing slower too. In one effort, I tried manually
calling the GC.Collect command, but this did not make much/any difference.
The memory usage by looking in the Settings > Memory section isn’t too
horrific, although it does creep up the way without the OS reclaiming much
back. Having said that, our customer has reported on a couple of occasions
that the native Out of Memory dialog has been produced. I call dispose on
the SQLCEDataAdaptor, SQLCEConnection, and the SQLCEReplication after use as
I know these are fairly memory intensive – I also call dispose on the form
controls of a screen once that screen is finished with. Each screen is read
in on startup, and then I use data structures to hold the format of each
screen while the app is running. When a screen is about to be displayed I
read in this structure and create each required control. For reading in info
from flat config files, I use OpenNetCF’s Ayende:Configuration class.
Does anyone have any ideas of how to optimise an app, or come across this
sort of thing???
Thanks for your time!
Basically, I have developed an app to run on the .Net Compact framework (on
Pocket PC 2002) which among other things using SQL CE Replication, reads
other info in from various config files, creates each form dynamically (this
was part of the customer spec), and holds all the user entered info in a
single data class.
The problem I am seeing now though is that when the app is first started it
has a fast performance, and the forms are created and displayed very quickly.
However, after some time of using it, the app slows down noticeably to the
point where forms take up to 5 seconds to be displayed, and presumably the
back ground code is progressing slower too. In one effort, I tried manually
calling the GC.Collect command, but this did not make much/any difference.
The memory usage by looking in the Settings > Memory section isn’t too
horrific, although it does creep up the way without the OS reclaiming much
back. Having said that, our customer has reported on a couple of occasions
that the native Out of Memory dialog has been produced. I call dispose on
the SQLCEDataAdaptor, SQLCEConnection, and the SQLCEReplication after use as
I know these are fairly memory intensive – I also call dispose on the form
controls of a screen once that screen is finished with. Each screen is read
in on startup, and then I use data structures to hold the format of each
screen while the app is running. When a screen is about to be displayed I
read in this structure and create each required control. For reading in info
from flat config files, I use OpenNetCF’s Ayende:Configuration class.
Does anyone have any ideas of how to optimise an app, or come across this
sort of thing???
Thanks for your time!