Precompile (how to prevent or delay)

Last post 08-25-2008 3:40 PM by bdunn13. 3 replies.

Sort Posts:

  • Precompile (how to prevent or delay)

    08-25-2008, 2:40 PM
    • Member
      365 point Member
    • bdunn13
    • Member since 01-30-2006, 2:56 PM
    • Georgia
    • Posts 86

     I am not sure where I should put this so I am going to try here as I think VS 2005 might best some up the subject.

     

    I am moonlighting some at night on a project to help out some where my Wife works. I am a pretty experienced .NET developer but like everyone else, I don't know it all(an I know I don't). I also use a text-editor at work for all my development needs, coding everything by hand.

     

    Well, where I am helping out, I am trying my best to do things their way and keep the code in the project consistent. They are using VS 2005. 

     

    This morning I got a complaint(the problem was there before I started helping on the project last week) about slow load time on the first page access. I know the code is compiling. I know a change in code, web.config, or app pool will force a recompile. Also, after time the code will again recompile, how long I don't know(usually overnight). What I would like to know is, what effects this time and what can I do to prevent a recompile from happening.

     

    The code was designed with the classes inside of the aspx pages(again, this is not my project as I would  have done it differently).

     

    Thanks,

    BD

  • Re: Precompile (how to prevent or delay)

    08-25-2008, 3:24 PM
    • Member
      122 point Member
    • jeriley
    • Member since 08-05-2008, 6:04 PM
    • Columbus, Ohio
    • Posts 22

    if it really is a big issue, there's a couple things you can try.  Instead of just dumping the code off, you can try something called "pre-compile" and that -should- knock out that load time issue.  Otherwise you're stuck with it.  My guess is IIS is allowing the process to die at night (no surprise if its not a 24/7 use app) and the first person hits it is the unlucky ninja. 

    I guess you could cheat and write an app that pings the site in the morning or every hour?  Kinda lame though, but it would work.

    My Blog
    Twitter

    Code Ninja ...because its cooler than a pirate.
  • Re: Precompile (how to prevent or delay)

    08-25-2008, 3:36 PM
    • Member
      365 point Member
    • bdunn13
    • Member since 01-30-2006, 2:56 PM
    • Georgia
    • Posts 86

     

    How do I set VS2005 to precompile?

     

    Thanks,

    BD

  • Re: Precompile (how to prevent or delay)

    08-25-2008, 3:40 PM
    Answer
    • Member
      365 point Member
    • bdunn13
    • Member since 01-30-2006, 2:56 PM
    • Georgia
    • Posts 86

     When I was referring to precompiling, I was talking about taking cs files to a dll and not using codebehind or app_code....

     

    Now, after doing a little more research, I TOTALY forgot about the precompiling from aspx pages to basicly axd pages..... but from what I just read, these features were dropped.... which stinks as it was a cool concept.

Page 1 of 1 (4 items)