Speed up App Startup

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ted

    #1

    Speed up App Startup

    I have a legacy app that launches a C# app. It takes a long time for it to
    launch the first time and after that it launches fine. I know it has to do
    with the .net runtime. Is there a way around this? This app uses 1.1 .net
    runtime.

    Thanks


  • C.C. \(aka Me\)

    #2
    Re: Speed up App Startup

    It take a while to compile the code into native machine language.. Remember,
    when you "compile" your .NET application it does not create machine code,
    but a byte-code type of language that still needs to be converted into
    machine specific code when it is ran for the first time.

    "ted" <ted@united.com > wrote in message
    news:%23kUKAChH GHA.596@TK2MSFT NGP10.phx.gbl.. .[color=blue]
    >I have a legacy app that launches a C# app. It takes a long time for it to
    >launch the first time and after that it launches fine. I know it has to do
    >with the .net runtime. Is there a way around this? This app uses 1.1 .net
    >runtime.
    >
    > Thanks
    >
    >[/color]


    Comment

    • Jon Skeet [C# MVP]

      #3
      Re: Speed up App Startup

      ted <ted@united.com > wrote:[color=blue]
      > I have a legacy app that launches a C# app. It takes a long time for it to
      > launch the first time and after that it launches fine. I know it has to do
      > with the .net runtime. Is there a way around this? This app uses 1.1 .net
      > runtime.[/color]

      The first time it loads, the .NET framework libraries have to load from
      disk. After that, they're probably cached. I suspect that if you leave
      your computer for a few hours (and do other things) then start the app
      up again, it'll be slow again.

      --
      Jon Skeet - <skeet@pobox.co m>
      http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
      If replying to the group, please do not mail me too

      Comment

      • Horst Nabulke

        #4
        Re: Speed up App Startup

        Am Fri, 20 Jan 2006 15:21:09 -0700 schrieb ted:
        [color=blue]
        > I have a legacy app that launches a C# app. It takes a long time for it to
        > launch the first time and after that it launches fine. I know it has to do
        > with the .net runtime. Is there a way around this? This app uses 1.1 .net
        > runtime.
        >
        > Thanks[/color]

        Hello Ted,

        have a look a this web page

        http://www.codeguru.com/Csharp/.NET/...php/c4651#more

        It's about the ngen.exe tool included in the .NET Framework. It could help
        to improve application load time...

        Bye

        Horst

        Comment

        • Vadym Stetsyak

          #5
          Re: Speed up App Startup

          You can also have a look at
          ( http://msdn.microsoft.com/msdnmag/is...2/CLRInsideOut )

          --
          Vadym Stetsyak aka Vadmyst
          Blog about software development, algorithms, network protocols, .NET, programming languages, tips &amp; tricks, coding techniques and more.


          "ted" <ted@united.com > wrote in message
          news:%23kUKAChH GHA.596@TK2MSFT NGP10.phx.gbl.. .[color=blue]
          >I have a legacy app that launches a C# app. It takes a long time for it to
          >launch the first time and after that it launches fine. I know it has to do
          >with the .net runtime. Is there a way around this? This app uses 1.1 .net
          >runtime.
          >
          > Thanks
          >
          >[/color]


          Comment

          Working...