Re: .NET JITTing - AOT compiling - Choice?

From: Jon Shemitz (jon_at_midnightbeach.com)
Date: 02/14/04


Date: Fri, 13 Feb 2004 15:02:26 -0800

Curt Krueger wrote:

> Why the only choice to JIT? Why not have the installer compile the app upon
> install or at least have a choice.. If you know the app is going to be
> installed and ran indefinitely on a specific platform, why not just compile
> the app up front when it's installed?

You do have a choice - it's called NGEN. You can opt to compile on
installation. Otoh, if the user moves his files to a new machine, your
app has now been NGEN-ed for the old CPU.

More importantly, NGEN doesn't save that much. According to Danny
Thorpe (who should know) the jitter compiles about as fast as D7.
That's compiles; not compiles and and links. You know how fast Delphi
compiles: It's definitely a lot faster than a hard disk doing demand
loading! So, jitting really isn't a huge hit on top of demand loading.
(All Windows apps are sluggish on start-up; with .NET it's just a bit
more so.)

All that NGEN saves you is that modest load cost. But, it's not free.
There's some indirection voodoo going on that means that calls OUT of
an NGEN-ed assembly cost more (about 8% more) than calls out of a
jitted assembly. (Calls within an NGEN-ed assembly are slightly
cheaper than (some) calls within a jitted assembly.) Most .NET
assemblies make a LOT of inter-module calls - System. this and System.
that - so NGEN can actually cost a long-running app more than it
saves.

-- 
programmer, author  http://www.midnightbeach.com
and father          http://www.midnightbeach.com/hs


Relevant Pages

  • Re: I have seen some fat client Dot Net apps
    ... How do you install the CF SDK if you don't have VS? ... install CF on a device was to write a trivial CF app in VS and install ... "Borland does not have license to ship the CF assemblies. ... assemblies and run the app unchanged on the CF platform. ...
    (borland.public.delphi.non-technical)
  • RE: Troubles deploying my application
    ... You say that you supply COM interop wrappers - does your install also install and register the COM components? ... One time I succeeded to run the app by making ... > execution and privileges to the required assemblies. ... > CodeBase: ...
    (microsoft.public.dotnet.general)
  • Re: vsto auto update security
    ... Is the update stuff handled by a different assembly than the one you've already granted trust to? ... That would require adding trust for that assembly also, assemblies called by trusted assemblies aren't themselves trusted automatically. ... I publish the app and added the manifest file to ... the install and removed filtered out the default manifest. ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: COM interop, pathing from .NET
    ... DLL that is being accessed by a VB6 app. ... Working with Assemblies and the Global Assembly Cache ... you do not have to install assemblies into the global assembly ...
    (microsoft.public.dotnet.framework.interop)
  • Re: ClickOnce Nightmares
    ... your app need to install the settings. ... LAN) you could create a logon script that will automatically install the ... DownloadOptions options, ServerInformation& serverInformation) ... FileAccess access, Boolean asyncHint) ...
    (microsoft.public.dotnet.framework)

Loading