Memory Leak XML TextReader & SQL Ce Insert?

I

info

I import XML Files using the XML Textreader and SQLCe Inserts on an
PocketPC


I Do nothing more then getting the data from the xml file and adding
these informations to an prepared SQLCeInsert which I then execute.

Normally it takes 23 Seconds for 500 Records. Which is ok

but sometimes the speed decreases very fast and the amount of used
application ram increases (~0,02k in 1,2 Seconds).

Then only an softreset of the PPC helps (Does anyone know this
problem?)

I found an article in which a similiar problem was described. They
supposed to use an DB Flush to solve this problem but I can't find any
c# code.

Does anyone have a code for this and can help me or does someone know
any other problems?
 
S

Syed N. Yousuf [MS]

To isolate the problem to XML read or SQL CE insert, try to read from a
text file and insert using the same SQL CE code.

Thank you!
Syed N. Yousuf
Microsoft Developer Support Professional

This posting is provided "AS IS" with no warranties, and confers no rights.
 
I

info

I ran the XMLReader Method for it self nand the memory usage didn't
increase.
I did this with 50.000 Records ten times everytime the same.

So it looks like the save method increases the memory usage
..
When I sometimes close the Connection every 100 Records and reopen it
than the insert speed remains always constant.

After 2 thousend records the used Application ram increased 0,24MB
which seems to be normal as I don't know if garbage collection has
cleaned up all things
 

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