What's a reasonable amount of memory for a .NE

2019-07-19 08:08发布

I've had a couple of complaints that one of our managed apps is using 20-25Mb of RAM. I normally push back and say that memory's cheap; get over it.

Is this reasonable for a Windows Forms app?

标签: memory clr
10条回答
冷血范
2楼-- · 2019-07-19 08:45

What are you doing? Does it justify using up about 20 full length novels worth of memory? Is that definitiely your app, and not just the .net runtime overhead? Is the machine in question running low on memory? Does it degrade performance?

That and a thousand and one other questions are what you need to answer :) I personally think that it's a ridiculously huge amount of memory... but then I work on mobile phones where 20mb is about the most I can ever get away with as a maximum heap size :)

查看更多
\"骚年 ilove
3楼-- · 2019-07-19 08:46

If you have repeatedly caused raised eyebrows with your application's memory footprint, you should at least have a little look at whether you really need this amount or if it is just accumulated inefficiency. Reducing the memory footprint often also brings a speed increase, and that in turn increases customer happiness. Often, this kind of complaint can also hint at other inefficiencies that just look like there is some bloat from the user's point of view.

查看更多
Root(大扎)
4楼-- · 2019-07-19 08:49

No it's completely outrageous. You call yourself a programmer? My God, man. When I started out, I could fit fifteen applications on a single punch card (that I had to punch with a pair of rusty toenail clippers, btw). They all completed within fifteen CPU cycles and actually CREATED memory out of nothing.

You should be ASHAMED. Resign at once.

查看更多
混吃等死
5楼-- · 2019-07-19 08:51

It depends what the app is doing. 20 - 25Mb doesn't sound like much to me.

I just created a very simple Windows Form app, with very little on it, and that took 19 - 20Mb. I assume that is probably around the minimum amount of memory a .NET forms application takes.

查看更多
Explosion°爆炸
6楼-- · 2019-07-19 08:57

That's pretty reasonable, yes. Allocating a bit more memory is cheaper than aggressively trying to keep the heap size down by GCing more frequently.

查看更多
小情绪 Triste *
7楼-- · 2019-07-19 09:03

There is a potentially valid reason for the pushback: What if your customer is using your app in a terminal services environment, and a dozen or more users are sharing 4GB of RAM? Add your 20 - 25 MB to Outlook's 30+, IE's 20+, Word's 25+ and Excel's 25+, multiply by the number of terminal users, and hopefully you can see where they might be coming from.

I think, in this day and age, 20 - 25 MB is perfectly reasonable. If you're in the hundreds of meg, that might be a different story. But it's all circumstance-specific.

查看更多
登录 后发表回答