Re: Reducing memory usage

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 03/25/05


Date: Fri, 25 Mar 2005 02:41:08 +0100


"Mikko Nylén" <mikko.nylen@gmail.com> schrieb:
> Is it somehow possible to reduce memory usage in Windows.Forms
> applications?
>
> Now when I create a empty form with code
>
> --
>
> namespace FormTest
> {
> using System.Windows.Forms;
>
> public class Testform
> {
> [STAThread]
> static void Main()
> {
> Form form = new Form();
> form.Visible = true;
> Application.Run(form);
> }
> }
> }
>
> --
>
> it takes ~14 MB of memory when compiled with debug configuration. When
> compiled with release configuration, it takes 9 MB. I also tryed to
> restart application for a couple of times, but the memory usage wont
> decrease.
>
> What can I do? If every form takes >= 9 MB, it could be a quite big
> performance bottleneck for larger applications.

Not every form will take >= 9 MB. Note that Windows Forms applications will
load some larger libraries which take some megabytes.

-- 
 M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
 V B   <URL:http://classicvb.org/petition/> 


Relevant Pages

  • Reducing memory usage
    ... Is it somehow possible to reduce memory usage in Windows.Forms applications? ... it takes ~14 MB of memory when compiled with debug configuration. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Reducing memory usage
    ... >> Is it somehow possible to reduce memory usage in Windows.Forms ... >> Now when I create a empty form with code ... >> it takes ~14 MB of memory when compiled with debug configuration. ... >> performance bottleneck for larger applications. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: [SLE] What is the big user of my CPU
    ... > Memory usage is a stable 7.7%. ... Fix font display problems showing up with internationalized ... applications using legacy toolkits like gtk1, ... result in 100% CPU usage by the Xserver when starting such ...
    (SuSE)
  • Re: fedora-list Digest, Vol 10, Issue 167
    ... I would rather like to pin-point the exact problem and if necessary ... I may change to normal user. ... Wich applications? ... I am worried about physical memory usage. ...
    (Fedora)
  • Re: RH 7.3 or 9?
    ... >> Launching applications is what takes 4X as long. ... Xemacs was the only one I ... I suppose you could have a situation where the memory usage of whatever ...
    (comp.os.linux.misc)