Tech Off Thread

18 posts

Why is .Net Framework so large?

Back to Forum: Tech Off
  • User profile image
    john259

    The download for .Net Framework is about 24MB (twenty-four megabytes). Please can anyone explain why it is so huge? As someone who remembers the Commodore PET, where the operating system and the BASIC interpreter together fitted in 4KB (four kilobytes), how can a mere extension to the operating system possibly be 24MB (and that's compressed)? I'm curious to learn the reason. John

  • User profile image
    UdoSchroeter

    Well, of course modern systems are partitioned in a very generous way (the data structures alone are much more wasteful) and don't forget that the PET didn't have a real operating system, and the interpreter did not much more than basic flow control and peek/poke commands.

    The .Net Framework is certainly not optimized for filesize in the first place (I may be wrong), but the sheer amount of functionality is just huge, almost too much for a single developer brain to keep all the features in RAM. There's tons of code in there. Of course, you can always optimize for space but sometimes the cost of doing so exceeds the usefulness of the idea. Bandwidth and storage gets cheaper by the month, anyway!

    For the sake of comparison, you could take a look at the Mono project, an implementation of a compatible framework, it's smaller than Microsoft's if I remember correctly. But then again, I doubt that it is as feature-rich as .Net.

  • User profile image
    john259

    Thanks Udo. [p] I've no problem with a program being large if that helps it to run quickly. [p] I'm just intrigued to know what it is that .Net does that requires it to be so huge. The only programs I've ever seen that need .Net Framework are RSS feed readers, and not even all of them. I can't see that parsing RSS feeds is _that_ complicated. [p] Obviously it does a lot more. Is there any chance of a quick explanation of what? [p] John [p] p.s. I'm experimenting in this post to see if BBCode can be used to create line feeds. Apologies it it's a mess as a result.

  • User profile image
    BradA

    I agree that the size is an issue -- we are working on that for Whidbey.  If you check out the preview you will see that the redist is a a good bit smaller... the cool thing is we did that at the same time we added lots of new functionality.

    The other thing we are working on is making the .NET Framework more widely available via Windows Updates, OEMs, 3rd party apps, etc.

  • User profile image
    JParrish

    This post seems a little strange. The .NET redistributable contains the CLR runtime, extensions for ASP.NET, Configuration plugins for the control panel, as well as the entire foundation classes. As far as RSS aggregators.. maybe you are reffering to the frameworks XML classes. If you are interested in what the framework currently offers take a look at the class library reference

  • User profile image
    john259

    Let me give you the history: subscribe to Lockergnome > see loads of sermons from Chris Pirillo praising RSS > try to find an RSS feed reader program > notice that most of them specify .Net framework as a system requirement > see .Net Framework in Windows Update and go for it > astonished that it is so huge, wonder what it does > see references to web services and ASP.NET, try to find out what they are, can't find anything anywhere that makes any sense whatsoever to an old-time BASIC programmer who taught himself simple HTML, it's either deeply technical or informationless marketing babble - hope this helps explain where I'm coming from - John

  • User profile image
    Manip

    Does Whidbey go anywhere to addressing the huge memory consumption of running .Net applications?

    Visual Basic 6 - 6MB
    C++ MFC - 3MB
    .Net - 9MB

  • User profile image
    jkirwan

    John,

    I think this page sums it up nicely. Sure, there's a little marketing babble in there, but I think it does a pretty good job of describing what exactly the Framework is.

  • User profile image
    saj

    Now the redistributable for the desktop is quite normal compared to the jdk ..

    Is it possible to customise what parts we could instal say on a pocket pc.. does the compact edition support this ..

    i might not want a particular BCL for the app and it could be quite a large assembly thats not needed.

    Like when selling a device with a custom app.. why should the whole framework be installed .

  • User profile image
    amg

    I'd love to see the .NET Framework rolled-in to XP SP2. =)

  • User profile image
    eddwo

    At the moment the .Net framework installer is included on the SP2 install discs, but it is not installed by default.
    If the SP2 discs become widely available, like AOL discs etc, then it shouldn't be too difficult for most people to find it on a nearby CD rather than having to download it.
    The framework is preinstalled in TabletPC, Media Center and Server 2003. Personally I so no reason why it shouldn't be preinstalled with SP2, at least on new machines sold with XP SP2 included.

    It's important to remember its a one-time only thing, once you have it installed it opens up a whole range of new applications, and will actually make the install packages smaller since a lot of the functionality is included in the framework.
    However this is not much comfort if all you want to destribute a small shareware app to a userbase that does not have it installed.

    Of course for longhorn the problem disappears altogether since it is an integral part of the platform, but most people won't want to wait that long to start developing programs that run on it.

  • User profile image
    SMac

    OT.. but why is Fedora so big? http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/iso/

    3CDs and it doesn't even play MP3s?

  • User profile image
    lars

    john259 wrote:
    However, it page assumes that the reader know what a web service is. [...]  if you asked a hundred ordinary home computer users, my feeling is that only a very small number would have heard of the term and hardly any would know what it meant.


    Even worse, John: major decision makers at large companies that think they know what it is because they understand the two words "web" and "service". The hype was just ridiculous. Everyone was into building Web Services as if was a magic wand.

    /Lars.

  • User profile image
    Andrew Davey

    I am less concerned about 20MB of hard disk space or the Net bandwidth to download it. What really worries me is that SharpReader is currently using 44MB of RAM! Hmm, no problem I've got 512MB in total. However, as more and more apps are written in .NET won't this become an issue when running lots at once? I admit I am pretty much clueless about side-by-side assemblies, etc. maybe someone can put me straight?

  • User profile image
    john259

    Thanks jkirwan that helped quite a bit. However, its page assumes that the reader knows what a web service is. I've got a vague glimmering (basically, as I understand it, it's a variation on the CGI script concept). But, if you asked a hundred ordinary home computer users, my feeling is that only a very small number would have heard of the term and hardly any would know what it meant. The figures would obviously be a little higher amongst programmers, but not much I think. This whole initiative seems to suffered from (and is still suffering from) a major failiure in communications by Microsoft. The boys who play with the new toys largely only talk to each other (Channel 9 being the major exception, of course). Marketing confuse the issue with their own inane pseudo-technical jargon, meanwhile real people remain totally mystified and after a while give up. But thanks again for the link, that was definitely the best explanation that I've found so far. - John

  • User profile image
    amg

    Don't worry...the 64-bit world is coming...where can pass that 2GB RAM barrier... Wink

  • User profile image
    JParrish

    I believe that the .NET runtime is greedy, in the sense that as long as you have memory available, it will keep objects around in case it can reuse them. As the memory demands from the system go up, more objects are released to accomodate. Does anyone know the details on this, garbage collection etc?

  • User profile image
    BHpaddock

    From what I understand, the above poster is correct.  If the cLR finds that you have 400MB of memory not in use, it will use as much as it reasonably can to keep performance up.  As the amount of available memory decreases (say, you load up Photoshop with a bunch of images), you'll see the .NET app free up resources that it doesn't really need.

    Ideally this should have no adverse affect on system performance, and should make .NET apps perform better than if they did not use this "greedy" method of memory allocation.

    Also, keep in mind that memory usage as reported by Task Manager is not truly accurate.  Much of what an app is supposedly using is actually paged out by the OS if not needed.

    Futhermore, I've heard mentioned a few times the existance of a bug that causes Task Manager to report incorrect memory usage values for .NET apps in general.  I've not found (nor looked for) any details about this bug, however, if it even exists (it could well just be some people seeing the effect of what I described above).

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.