Performance Issue in ViewEngine Customization

Nov 9, 2011 at 9:34 AM


First of all thanks for such a wonderful post.

I happen to do a poc using with the help of your files..  using 51* mobi foundation for  device detection and customize razor view so that it support all view (web => view, mobile =>, tablet => view.tablet.cshtml).


1)  Put the 51 degree mobi files in AppData

2) Reference to 51 degree mobi foundation dll.

3) Create a custom razor engine by inheriting razor engine. (used same code that is present in your source code).

4) Now i compile and run my present it runs smoothly.

5) Now in VS 2010 click analyze => performance wizard => Instrumentation option  => (next) => select the project =>(next) => Select the default option => (next)  => click finish

6) Now is see  NewFindView is taking about 30% of time and  when i drilled further could see File.Exists in NewFindView function is actually taking this much time.

Can you please help in let me know what is the issue and how to overcome this.