Re: Optimizations to Reduce Memory Consumption and Minimize Paging

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"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/
.



Relevant Pages

  • Re: forall and do loop
    ... a good freeware profiler tool to look into the bottlenecks. ... Note that the Heisenberg uncertainty principle holds for profiling - ... use the profiling information for subsequent optimizations, ... a Fortran coding style that will make my programs automatically well- ...
    (comp.lang.fortran)
  • Re: recommended way implementing a debugger
    ... Passive profiling ... Active profiling tends to work best for things like ensuring code ... Passive profiling tends to work better for measuring the exact time ... because turning on any sorts of optimizations ...
    (comp.lang.asm.x86)
  • Re: JavaScript implementation
    ... to write about saving 1 microsecond? ... As with all optimizations: Don't do it, ... profiling) that it is going to help. ...
    (comp.lang.javascript)
  • Re: ruby-ole-1.2.3 released!
    ... Initial property set support. ... Optimizations from benchmarks and profiling, ...
    (comp.lang.ruby)