Static/HTML site

Nov 6, 2010 at 1:54 AM

As nearly all the activity on the site will be reading the site, I don't want to tie up the ASP.NET pipeline just with page serves.

Has anyone looked into having the site generate static html pages for each post to store them on disk, and refresh them when a new edit occurs or comment gets submitted?

Thanks

Nov 14, 2010 at 5:23 AM

Anyone know if this is on the roadmap or if it would be much of a hack?

Coordinator
Nov 14, 2010 at 5:09 PM

There's nothing like this on the roadmap.  The idea is nice, but not at all necessary.  The whole point of the ASP.NET pipeline is to serve pages.  To consider serving pages as being burdensome for the ASP.NET pipeline doesn't make sense.  It's like saying that asking a cook to make a dish is asking too much of him.  That's the cook's job.

Now, if there was some heavy processing required to generate a page ... maybe where lots of calculations need to be done (i.e. lots of CPU crunching), and it takes 5, 10, 15 seconds and the final result is an HTML page where the data (the result) is always the same, then it might make sense to create a page ahead of time -- or to have the calculations already pre-calculated so the calculations do not need to occur everytime.

There's nothing going on like this in BE.  A typical page loads in a matter of a second (+/-).  A lot of the data is actually already cached in memory to improve the whole process.  For example, the posts are cached in memory, so they don't need to be looked up every time from the file system or from a DB.  A lot of the widget data is also cached, so what you see has already been calculated and is being served directly from memory which is a very fast process.

Some of this data that is cached is setup to keep it cached until some type of edit occurs, or a new comment is submitted, etc.  This last part is what you had in mind, and is actually being done.  The data is cached in memory so it doesn't need to be regenerated each time.  The ASP.NET pipeline is still involved, but again, that is its core job ... to serve pages.