Re: Small C# program takes up too much memory
- From: "Chris Mullins [MVP]" <cmullins@xxxxxxxxx>
- Date: Wed, 21 Feb 2007 11:06:59 -0800
While I agree with you 100% on every technical level, the user's perception
defines reality. Users see the big number in task manager and get cranky.
They see a small number, they're happy.
I really wish I had a better answer. For almost all the small client-side
stuff we do, this works well. Especially as these apps load, and don't
really do anything. They're doing almost no processing, no data base stuff -
they're just sitting idle and reporting that they're taking 20-50 megs of
memory.
Running GC.Collect over & over doesn't even solve the problem - the app
still reports a huge amount of memory, and the users perception then is that
we suck.
Please - give me a better solution! :)
--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins
"Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx> wrote in message
news:eD7ki6dVHHA.3652@xxxxxxxxxxxxxxxxxxxxxxx
"Chris Mullins [MVP]" <cmullins@xxxxxxxxx> wrote in message
news:%23Wk1%237TVHHA.4764@xxxxxxxxxxxxxxxxxxxxxxx
<elty123@xxxxxxxxx> wrote in message:
I have a small C# program (about 400 lines of code) that is only 28kb
after compiled.
However when it runs (takes a whole 5 seconds) it takes up nearly 20MB
of memory and I don't see why.
[...]
Is there anyway I can reduce the memory usage?
This is a pretty common problem. Fortunatly there's a pretty easy
solution:
http://www.coversant.net/dotnetnuke/Default.aspx?tabid=88&EntryID=4
--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins
Chris,
you don't want your applications to run under an administrator account
just to fake low memory consumption do you?
Note that doing this is much worse than calling GC.Collect in .NET, all it
does is disturb the OSses BalanceSet Manager without any benefit for the
user.
Willy.
.
- Follow-Ups:
- Re: Small C# program takes up too much memory
- From: Willy Denoyette [MVP]
- Re: Small C# program takes up too much memory
- From: Ted E .
- Re: Small C# program takes up too much memory
- From: Tom Porterfield
- Re: Small C# program takes up too much memory
- References:
- Small C# program takes up too much memory
- From: elty123
- Re: Small C# program takes up too much memory
- From: Chris Mullins [MVP]
- Re: Small C# program takes up too much memory
- From: Willy Denoyette [MVP]
- Small C# program takes up too much memory
- Prev by Date: RedirectStandardOutput & OpenTextFile Conflict
- Next by Date: RE: Concerns over Excessive Testing of Chemicals in Europe
- Previous by thread: Re: Small C# program takes up too much memory
- Next by thread: Re: Small C# program takes up too much memory
- Index(es):
Relevant Pages
|