I was actually interested in an answer to tilly's question. What is it that makes .Net better for you than the JVM with regards to performance / memory use? Because I haven't seen extreme differences in my situations either.

Here's an experiment.

  1. Configure your Windows machine to turn on IIS, running a simple website (i.e. an email form).
  2. Restart Windows, access the website and take a note of your system resource usage.
  3. Disable IIS.
  4. Create the same setup using JBoss.
  5. Restart Windows, access the Java version of the website and take a note of your system resource usage.

In all fairness, since this is Windows we're talking about, and there could be special optimizations in Windows to help IIS + .Net work better on Windows than JBoss/Tomcat/BEA Weblogic/Websphere/etc on Windows — go ahead and repeat the Java experiment on Sun Solaris on a Sunfire server instead (with that extra cash hanging out under your sofa cushions).

I wasn't able to perform the experiment on a Sunfire server with Solaris (no extra dough) but on my laptop (2Ghz dual-core prod with 4Gb RAM) I saw 3x more RAM used by the Java setup than the IIS setup.

I could start ranting about how I think Java development is mostly a PITA and should be much easier (look at how simple the language is, for God's sake) — but I won't. Strictly looking at resource usage, ASP.Net is clearly the winner when we look at an out-of-the-box configuration. For .Net, this includes JIT-compiling, for Java it does not. Maybe that's why. Maybe it's the stack-based VM vs the heap-based VM. Maybe it's just that the CLR is more modern and builds on the successes and failures of the JVM in a way that the JVM can't.

I don't know why - I didn't write either VM and certainly won't be writing one anytime soon :-). All I know is that the time it takes me to write something extremely common, say — an email form that allows a file attachment and includes a CAPTCHA — takes about an hour or so with .Net and might take me a couple days with Java. This probably says more about my Java skills than the tools themselves, but the fact that ASP.Net comes with easy file-upload capabilities right out of the box and JSP doesn't (AFAIK) says something.

IRONY: Discussing ASP.Net and Java on Perlmonks.


In reply to Re^8: Perl and C# - how I use both by jdrago_999
in thread Perl and C# - how I use both by jdrago_999

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.