OptimizeCompilations = "true" doesn't seem to work

I have a web application project linking to other projects and dll. Some time ago, we added the optimizeCompilations = "true" flag to web.config to reduce the wait time for the start page to update after making changes to one of the related files. We got a wait time of about 15-20 seconds.

However, at some point, the wait was much longer, and I can not understand what is the reason. I read a bunch of articles on this flag and I know that it really describes how it determines when to recompile the entire site in the temp Framework folder. It seems that no matter what I recompile, whether it’s the reference dll or the dll of the web application itself, when I am on the first page, the entire contents of the temp framework folder will be recreated in about 90 seconds.

Is there any way to track the cause of this.

In what makes me a thing, the optimizeCompilation flag does not work, because when it worked, sometimes we came across one of those side cases where the change would require updating the entire site and we would get an error. At this point, we had to rebuild to fix this. I can’t remember the last time this happened.

As I understand it, even if the Dlls change radically, the whole site will NOT recompile if this flag is set.

Also, I found something strange. In the temp temp folder for the website there is a hash.web file containing a hash code. I guess this is the code that the compiler uses to see something change. As a test, I wrote down this code, made changes to the source file, and compiled it. Then I checked the bin folder and noted that the only files changed were several DLLs. I updated my webpage in my browser and it took more than a minute to refresh. Then I checked the temp framework folder, and basically all the files had current data, i.e. they were all recompiled. However, when I checked the hash code in hash.web, it was the same. I would have thought it would be different.

+6
source share

Source: https://habr.com/ru/post/910315/


All Articles