Razor view engine, parse directly to file

119 Views Asked by At

Bit of stab in the dark here.

We currently use the Spark view engine to help render an xml template that is used within our application for reporting purposes. It works nicely however we have hit a hurdle in that some of our xml templates, once processed, are very large. So large in fact they are causing a problem to run directly in memory. Because of this we are exploring the possibility of writing them straight to disk.

Now, it looks like this may be possible with Spark as you can pass a TextWriter in to the render method. But I'm unsure as to whether this is possible with the Razor view engine. Possibly using a technique similar to that described in this post.

http://buildstarted.com/2010/09/29/razor-view-engine-without-mvc-at-all/

Like I say, bit of a stab in the dark but any help appreciated.

0

There are 0 best solutions below