This change optimizes allocations by RouteValueDictionary based on usage. First, implement a struct Enumerator, and expose the concrete RVD type from all extensibility points. We wanted to try and decouple this code from RVD originally and use IDictionary everywhere. After doing that we've found that it allocates an unacceptable number of enumerators. Secondly, optimize copies of RVD for the case where you're copying an RVC to another (common case). When doing this we can copy the count to get the right capacity, and copy the entries without allocating an enumerator. Lastly, optimize RVD for the case where it's a wrapper around a poco object. We 'upgrade' to a writable full dictionary if you try to write to it, or call one of a number of APIs that are uncommonly used. We could produce optimized versions of things like `Keys` and `CopyTo` if necessary in the future. |
||
|---|---|---|
| samples/RoutingSample.Web | ||
| src | ||
| test | ||
| tools | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| LICENSE.txt | ||
| NuGet.config | ||
| NuGetPackageVerifier.json | ||
| README.md | ||
| Routing.sln | ||
| Settings.StyleCop | ||
| appveyor.yml | ||
| build.cmd | ||
| build.sh | ||
| global.json | ||
| makefile.shade | ||
README.md
ASP.NET Routing
Contains routing middleware for routing requests to application logic.
This project is part of ASP.NET 5. You can find samples, documentation and getting started instructions for ASP.NET 5 at the Home repo.