Go to file
David Obando 742a9e3f3b Reduce the number of allocations during model validation
When the service receives a model (say, via a POST message) MVC validates it to ensure the model is in a correct state. Validation currently incurs in many allocations that can be avoided. This tackles two of them:
  1. We're now caching the generic `GetEnumerator<T>` method infos generated on the fly during collection validation, and
  2. We're now only initializing `ModelErrorCollection` on demand.

The first one incurs in the additional allocation of 1 long-lived dictionary object, which will grow only to the amount of `Collection<T>` types used by the model being validated. This is expected to be a small to medium number.

The second change assumes that class `ModelStateEntry` isn't thread safe, as model validation isn't multithreaded.

This resolves #4434 and #4435.
2016-05-02 19:28:20 -07:00
samples/MvcSandbox Merge branch 'release' into dev 2016-05-02 14:58:54 -07:00
src Reduce the number of allocations during model validation 2016-05-02 19:28:20 -07:00
test Merge branch 'release' into dev 2016-05-02 14:58:54 -07:00
tools
.gitattributes
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.txt
Mvc.NoFun.sln Move samples to Entropy 2016-05-02 10:06:17 -07:00
Mvc.sln Merge branch 'release' into dev 2016-05-02 12:26:37 -07:00
NuGet.config Updating to release. 2016-04-06 09:50:10 -07:00
NuGetPackageVerifier.json Remove Microsoft.AspNetCore.Mvc.Dnx from NugetPackageVerifier.json 2016-05-02 12:53:47 -07:00
README.md Fix package metadata 2016-04-13 12:07:04 -07:00
Settings.StyleCop
appveyor.yml
build.cmd
build.ps1 Updating to release. 2016-04-06 09:50:10 -07:00
build.sh Updating to release. 2016-04-06 09:50:10 -07:00
global.json

README.md

ASP.NET Core MVC

AppVeyor: AppVeyor

Travis: Travis

ASP.NET Core MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and gives you full control over markup for enjoyable, agile development. ASP.NET Core MVC includes many features that enable fast, TDD-friendly development for creating sophisticated applications that use the latest web standards.

ASP.NET Core MVC in ASP.NET Core includes support for building web pages and HTTP services in a single aligned framework that can be hosted in IIS or self-hosted in your own process.

Related community projects:

This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.