Answer
Razor View Compilation converts .cshtml files into C# classes and compiles them into assemblies.
- Runtime compilation – Views are compiled on first use; flexible but slower for initial requests.
- Precompilation – Views are compiled at build/publish time; improves startup and reduces CPU at runtime.
Production apps typically use precompiled views to improve startup time and performance.