470,810 Members | 873 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

Garbage Collection - Prediction or pausing...

We have an application where we process a long series of items (10,000 - up
to 1,000,000). Each item has a short time frame within which several
complicated processes MUST happen - An item passes a camera, and by the time
it reaches an ink sprayer, it must have been completely processed (around
10ms).

All in all C# performance is fine. However, the issue is the garbage
collector. It can pause the app, and cause problems -- when an item is missed
this is a big problem.

So, is it possible to:

a) Predict when the garbage collector is going to interrupt?
b) Turn off the Garbage Collector until a point is convenient to process?

If not, we have thought that we would periodically call:

GC.Collect(); GC.WaitForPendingFinalizers();

However, I'm not sure what the result of that would be - Is it still
possible that the GC might kick in, even though it is not low on memory? Or
because memory is fragmented (etc)?

Any thoughts or comments on dealing with this issue would be appreciated.
Apr 13 '06 #1
0 846

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ganesh | last post: by
11 posts views Thread by Rick | last post: by
34 posts views Thread by Ville Voipio | last post: by
5 posts views Thread by Bob lazarchik | last post: by
28 posts views Thread by Goalie_Ca | last post: by
56 posts views Thread by Johnny E. Jensen | last post: by
350 posts views Thread by Lloyd Bonafide | last post: by
109 posts views Thread by jacob navia | last post: by
158 posts views Thread by pushpakulkar | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.