Why is page display so slow from precompiled site?

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

    Why is page display so slow from precompiled site?

    Hi all,

    Within an IFRAME of a standard site constructed of mostly static HTM type
    pages, I am calling up one page from a large ASP.NET 3.5 site. I have
    precompiled the ASP.NET site and published. "Allow precompiled site to be
    updateable" is NOT checked. "Enable strong naming on precompiled assemblies"
    is NOT checked. However, "Use fixed naming and single page assemblies" IS
    checked. I did with the idea that if I call a single page from another site
    it will display faster if it is contained in its own assembly and maybe I am
    entirely wrong on that account.

    In the web.config of the development machine where I precompile the site I
    have
    <compilation debug="true" strict="false" explicit="true" >

    I precompile to a local folder then ftp the site to the production server.

    However when I upload the precompiled site the web.config on the production
    server has
    <compilation debug="false" strict="false" explicit="true" >

    Maybe I need to change my dev machine web.config every time I precompile for
    publishing?

    There are 182 objects in the bin folder of the precompiled site. 92 objects
    are dll assemblies. 84 objects are small files with .compiled as the
    extension. Other files are 3rd party licenses and a couple XML files. There
    are no .vb files in the entire deployed site

    It takes 15 seconds to load that single page the first time in the morning.
    Subsequent calls to that page (even after session timeout) take 2-3 seconds
    max. The page uses Session state. It also calls 4 other pages if the user
    clicks on certain links. It almost seems as if the entire site is being
    recompiled by calling that single initial page.

    The page runs 2 simple SQL queries to display all the managed properties
    held by the owner of the public site within a grid and then allows searching
    to narrow down the selection. I just tested both queries on our slower SQL
    Server here at the office and they each took less than 1 second as the first
    queries in the AM.

    I understand that there are many factors that determine how quickly a page
    arrives at the browser.

    Can anyone suggest what I might do with the precompile deployment that would
    speed things up? I think I must be making a big mistake somewhere.

    Thanks for any help with this.


  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    #2
    RE: Why is page display so slow from precompiled site?

    ..net code has two compiel steps. the first produces a dll/exe with il code
    which is machine independent. when you first run a .net app, it need to
    convert the il code to machine code, this is done evreytime you run the app.

    in asp.net when you first hit a site it does a lot of work. it creates an
    appdomain to run the .net code in. it loads and compiles (called jit) all
    dll's in the bin folder. it also resolves and load any reference to a gac
    assembly.

    you can speed up startup a little by using aspnet_merge to produce one
    assembly. also you shoudl stepa heath tester that hits your site an reports
    on health. this will have the side benefit of keeping the site loaded.


    -- bruce (sqlwork.com)


    "John Kotuby" wrote:
    Hi all,
    >
    Within an IFRAME of a standard site constructed of mostly static HTM type
    pages, I am calling up one page from a large ASP.NET 3.5 site. I have
    precompiled the ASP.NET site and published. "Allow precompiled site to be
    updateable" is NOT checked. "Enable strong naming on precompiled assemblies"
    is NOT checked. However, "Use fixed naming and single page assemblies" IS
    checked. I did with the idea that if I call a single page from another site
    it will display faster if it is contained in its own assembly and maybe I am
    entirely wrong on that account.
    >
    In the web.config of the development machine where I precompile the site I
    have
    <compilation debug="true" strict="false" explicit="true" >
    >
    I precompile to a local folder then ftp the site to the production server.
    >
    However when I upload the precompiled site the web.config on the production
    server has
    <compilation debug="false" strict="false" explicit="true" >
    >
    Maybe I need to change my dev machine web.config every time I precompile for
    publishing?
    >
    There are 182 objects in the bin folder of the precompiled site. 92 objects
    are dll assemblies. 84 objects are small files with .compiled as the
    extension. Other files are 3rd party licenses and a couple XML files. There
    are no .vb files in the entire deployed site
    >
    It takes 15 seconds to load that single page the first time in the morning.
    Subsequent calls to that page (even after session timeout) take 2-3 seconds
    max. The page uses Session state. It also calls 4 other pages if the user
    clicks on certain links. It almost seems as if the entire site is being
    recompiled by calling that single initial page.
    >
    The page runs 2 simple SQL queries to display all the managed properties
    held by the owner of the public site within a grid and then allows searching
    to narrow down the selection. I just tested both queries on our slower SQL
    Server here at the office and they each took less than 1 second as the first
    queries in the AM.
    >
    I understand that there are many factors that determine how quickly a page
    arrives at the browser.
    >
    Can anyone suggest what I might do with the precompile deployment that would
    speed things up? I think I must be making a big mistake somewhere.
    >
    Thanks for any help with this.
    >
    >
    >

    Comment

    • John Kotuby

      #3
      Re: Why is page display so slow from precompiled site?

      Thanks Bruce,
      I guess setting up a site "health" tester would keep the site "warm" as I've
      read in an article. Thanks for the quick explanation.

      "bruce barker" <brucebarker@di scussions.micro soft.comwrote in message
      news:BBD97722-8DBA-4729-8279-385155671AA6@mi crosoft.com...
      .net code has two compiel steps. the first produces a dll/exe with il code
      which is machine independent. when you first run a .net app, it need to
      convert the il code to machine code, this is done evreytime you run the
      app.
      >
      in asp.net when you first hit a site it does a lot of work. it creates an
      appdomain to run the .net code in. it loads and compiles (called jit) all
      dll's in the bin folder. it also resolves and load any reference to a gac
      assembly.
      >
      you can speed up startup a little by using aspnet_merge to produce one
      assembly. also you shoudl stepa heath tester that hits your site an
      reports
      on health. this will have the side benefit of keeping the site loaded.
      >
      >
      -- bruce (sqlwork.com)
      >
      >
      "John Kotuby" wrote:
      >
      >Hi all,
      >>
      >Within an IFRAME of a standard site constructed of mostly static HTM type
      >pages, I am calling up one page from a large ASP.NET 3.5 site. I have
      >precompiled the ASP.NET site and published. "Allow precompiled site to be
      >updateable" is NOT checked. "Enable strong naming on precompiled
      >assemblies"
      >is NOT checked. However, "Use fixed naming and single page assemblies" IS
      >checked. I did with the idea that if I call a single page from another
      >site
      >it will display faster if it is contained in its own assembly and maybe I
      >am
      >entirely wrong on that account.
      >>
      >In the web.config of the development machine where I precompile the site
      >I
      >have
      ><compilation debug="true" strict="false" explicit="true" >
      >>
      >I precompile to a local folder then ftp the site to the production
      >server.
      >>
      >However when I upload the precompiled site the web.config on the
      >production
      >server has
      ><compilation debug="false" strict="false" explicit="true" >
      >>
      >Maybe I need to change my dev machine web.config every time I precompile
      >for
      >publishing?
      >>
      >There are 182 objects in the bin folder of the precompiled site. 92
      >objects
      >are dll assemblies. 84 objects are small files with .compiled as the
      >extension. Other files are 3rd party licenses and a couple XML files.
      >There
      >are no .vb files in the entire deployed site
      >>
      >It takes 15 seconds to load that single page the first time in the
      >morning.
      >Subsequent calls to that page (even after session timeout) take 2-3
      >seconds
      >max. The page uses Session state. It also calls 4 other pages if the user
      >clicks on certain links. It almost seems as if the entire site is being
      >recompiled by calling that single initial page.
      >>
      >The page runs 2 simple SQL queries to display all the managed properties
      >held by the owner of the public site within a grid and then allows
      >searching
      >to narrow down the selection. I just tested both queries on our slower
      >SQL
      >Server here at the office and they each took less than 1 second as the
      >first
      >queries in the AM.
      >>
      >I understand that there are many factors that determine how quickly a
      >page
      >arrives at the browser.
      >>
      >Can anyone suggest what I might do with the precompile deployment that
      >would
      >speed things up? I think I must be making a big mistake somewhere.
      >>
      >Thanks for any help with this.
      >>
      >>
      >>

      Comment

      • jturner

        #4
        Re: Why is page display so slow from precompiled site?

        I had the same problem. The reason is that the application domain
        times out every 20 mins if there is no activity, the first request
        after the timeout can force a recompile and reload of cache. Changing
        some settings in the machine.config file will solve the problem;
        unfortunately for me my hosting provider would not allow me to make
        this change. I found this utility to be useful.






        Essentially it "Pings" my home page every few mins so the application
        domain does not time out. The utility can also be configured to ping
        more than one page so that auxiliary pages are fast too.

        Comment

        Working...