09.27.06

ASP.NET Performance Issue When Putting Many Files in the Same Folder

Posted in Programming at by chenty

My current project is semi-dynamic. It is actually dynamic, but I created many files in html format, so the search engine can give me better rank. However, after I implemented such system, the performance is unbearable. It took 2-5 mins to open up a page. I did many testing, and found once I opened up a page and waited 2-5 mins, all other pages in the same folder are already cached. This suggested maybe .NET engine compiled all files in the same folder at once, even though I only need one file to be compiled. Therefore, I create a new engine, which stores all these files in thier own folders (only one file per folder). Amazingly, the performance issue is solved in this way. The page opened up in mere seconds instead of minutes.

A good lesson:
Do not put many dynamic files in one folder, or .NET tends to compile everything in the same folder at once.

09.17.06

“Could not load assembly” errors are back. VERY UNFORTUNATE…

Posted in Programming at by chenty

After three weeks of peace, that annoying “Could not load assembly” returns, even I have the hotfix installed.

However, that’s not the end of the world, and I found this from ASP.NET forum:

http://forums.asp.net/3/1401567/ShowThread.aspx#1401567

ICGopher Wrote:
Has anyone else noticed that disabling the debug in web.config seems to avoid this error? We have an application we are pushing out, and have experienced this problem. I disabled debug in the web.config in our test environment, I’ll report if we do not see the problem persist (although it seems like a hard bug to recreate).

I tried it, and it seems work for me. Instead of manually changing something on the problem page and forcing the server re-compile, I simply turned off “debug”, and the error disappeared.