We have an application that uses Spark as the view engine, but we haven’t figured out a way to precompile the views due to the way we have things setup. Due to this (at least we think it is due to this), we have what appears to be a memory leak (although, I’m not sure that is an accurate description).
Our app is an MVC3 web app. Now, each of our customers can fully theme the way our app looks for them (for example, when you hit www.example.com/app/customer1 it can and usually will be “themed” completely differently than www.example.com/app/customer2 ). The way we do that is we let our customers upload an html page that looks just like their website – but without the content. We then use that html page as a Spark master layout for that customer and stick a named content section in the page where the content of our app will be rendered.
Here is how we do this:
With those 3 things in place, we are able to replace the default master layout with a custom designed master layout for each customer and this has worked really great and provided tons of flexibility to our customer base. However, it appears that doing this creates a memory problem on our server. Essentially, what we see on the server is that the Memory (Private Working Set) for our app pool just continues to grow until it runs out of memory. So, for the moment we've tuned our app pool to recycle when it hits a certain memory limit and after some trial and error we've gotten it to a reasonably stable setting, but obviously that is not optimal.
From what I’m able to tell based upon some memory profiling, what we’re seeing is similar to what Steve Stevenson reported in this issue: https://groups.google.com/d/topic/spark-dev/HYexZD_pu3s/discussion . In that post, Louis says it wouldn't be a problem for people who pre-compile which I can only infer means that it WILL affect people who are not pre-compiling, like us. And given our situation above, we haven’t been able to figure out how to pre-compile due to the dynamic nature of our master layouts.
So, a couple of questions:
Thanks for any help, guidance or pointers!
James
--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spark-dev+...@googlegroups.com.
To post to this group, send email to spar...@googlegroups.com.
Visit this group at http://groups.google.com/group/spark-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.