Re: Optimizations to Reduce Memory Consumption and Minimize Paging
- From: Barry Kelly <barry.j.kelly@xxxxxxxxx>
- Date: Fri, 16 Jun 2006 09:17:40 +0100
"Mike S" <mgspross@xxxxxxxxxxxx> wrote:
However, when I look at the untouched auto-generated code and compare
it to his optimized version, I'm wondering how it actually runs better.
Without a compiling sample, it's hard to investigate properly. Have you
tried profiling the two side by side (even simply Performance Monitor
will do), and checking how much time is being spent in the GC?
The most obvious "optimizations" appear to be the calls to GC.Collect(),
which are not recommended unless you know the memory size of the whole
application and you know that you've just made a significant fraction of
the total object graph unreachable. To find out if that actually did the
trick, you'd need to profile.
I've never had to use GC.Collect() to get good performance, myself; I
have, however, sometimes used object pooling for large objects (i.e.
objects allocated on the LOB, the Large Object Heap).
-- Barry
--
http://barrkel.blogspot.com/
.
- Follow-Ups:
- References:
- Prev by Date: Re: ToString() does not exist ... anywhere !
- Next by Date: Re: DataGrid Summary Row?
- Previous by thread: Optimizations to Reduce Memory Consumption and Minimize Paging
- Next by thread: Re: Optimizations to Reduce Memory Consumption and Minimize Paging
- Index(es):
Relevant Pages
|