Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6041321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:38:41+00:00 2026-05-23T06:38:41+00:00

I am attempting to use the Razor view engine as a general templating engine

  • 0

I am attempting to use the Razor view engine as a general templating engine backed by a database.
http://razorengine.codeplex.com/ The problem is that for every template compilation a new dynamic assembly is created and loaded. As there is no way to unload an assembly from the current appdomain and no way to use a separate appdomain for the templating system (use of anonymous types) these assemblies will keep accumulating until the appdomain is destroyed. The templates themselves will change on a regular basis and as such will result in more recompiles.

The question is will these dynamic assemblies (potentially thousands) hurt the appdomain performance? Or alternately is there a better way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:38:42+00:00Added an answer on May 23, 2026 at 6:38 am

    In general having many small assemblies loaded in the AppDomain shouldn’t be something to worry about too much. The only general statement anyone could make about this is to measure the actual performance of the app in the relevant scenarios and then see if it matters.

    ASP.NET has some automatic app lifecycle management that will recycle the AppDomain after certain events. For example, if there are too many recompilations in the app then ASP.NET will automatically restart the app. This means that all the previously loaded assemblies will be cleared out and you start from scratch.

    See MSDN for more info: http://msdn.microsoft.com/en-us/library/s10awwz0.aspx

    numRecompilesBeforeAppRestart

    Optional Int32 attribute.

    Specifies the number of dynamic recompiles of resources that can occur before the application restarts. This attribute is supported at the global and application level but not at the directory level.

    Note

    ASP.NET increases the NumRecompilesBeforeAppRestart property every time an assembly is invalidated and fails to be deleted.

    The default is 15.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to use the Import Reports - Access feature as discussed here: http://msdn.microsoft.com/en-us/library/ms156508.aspx
We are attempting to use a SQL Server 2003 database for our test records
Attempting to use JRuby 1.2.0 and Rails 2.3.2 with an embedded Derby database. I've
Attempting to use asp.net mvc's Action Result of File. So it would seem that
I'm attempting to use the sample broker that comes with ActiveMQ 5 with an
I am attempting to use the VB.Net Excel COM interop to programmatically change the
I'm attempting to use a custom Android vertical scrollbar widget that seems to work
In attempting to use the Performance Tools on an ASP.NET website I'm getting various
I'm attempting to use Mono to load a bitmap and print it on Linux
I'm attempting to use TinyXML to read and save from memory, instead of only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.