Commit Graph

19 Commits

Author SHA1 Message Date
Ryan Nowak 3e5b37f22c Fix #6102 - Intense CPU utilization on page change (#6542)
* Fix #6102 - Intense CPU utilization on page change

The issue here was that every time a Razor Page changed, we would
subscribe an additional time to the endpoint change notifications. This
means that if you tweaked a page 30 times, we would update the address
table 31 times when you save the file. If you were doing a lot of editing
then this would grow to a really large amount of computation.

The fix is to use DataSourceDependentCache, which is an existing utility
type we developed for this purpose. I'm not sure why it wasn't being
used for this already. We're already using DataSourceDependentCache in a
bunch of other places, and it's well tested.

I also tweaked the stucture of this code to be more similar to
EndpointNameAddressScheme. This involved some test changes that all
seemed like good cleanup. The way this was being tested was a little
wonky.

(cherry picked from commit a5658a8c95)
2019-01-15 16:55:27 -08:00
James Newton-King cd308e7a8b
Fix HttpContext not being passed to constraints in link generation (#6644) 2019-01-16 12:00:57 +13:00
John Luo 38c0d5a50c
Use object indirection in HttpContextAccessor (#1066) (#6036) 2019-01-14 20:31:36 -08:00
Nate McMaster 22f3166fa6
Merge branch 'release/2.1' into release/2.2 2019-01-10 01:22:10 -08:00
Nate McMaster a3f9b74bb9
Merge branch 'release/2.1' into release/2.2 2019-01-09 14:52:53 -08:00
Nate McMaster 5d16f97965
Remove netcoreapp2.0 test TFMs (#6461)
.NET Core 2.0 reached EOL last year. This removes multi-targeting our test projects and test assets to only use .NET Core 2.1 and .NET Framework 4.6.1.
2019-01-08 11:20:09 -08:00
James Newton-King 4601a26ec2
Fix order in DFA matcher test (#5954) 2018-12-21 07:33:54 +13:00
Nate McMaster feb641ddda
Merge branch 'release/2.1' into release/2.2 2018-12-14 09:44:15 -08:00
Nate McMaster 13ae0057fb
Replace .Sources package references with local code (#4801)
Replaces package references the following packages with local code:

Microsoft.AspNetCore.Certificates.Generation.Sources
Microsoft.Extensions.CopyOnWriteDictionary.Sources 
Microsoft.Extensions.ClosedGenericMatcher.Sources
Microsoft.Extensions.ObjectMethodExecutor.Sources
Microsoft.Extensions.PropertyActivator.Sources
Microsoft.Extensions.PropertyHelper.Sources
Microsoft.Extensions.RazorViews.Sources
Microsoft.Extensions.SecurityHelper.Sources
Microsoft.Extensions.StackTrace.Sources
Microsoft.Extensions.WebEncoders.Sources
2018-12-14 08:36:36 -08:00
dotnet-maestro-bot 38785d0be9 [automated] Merge branch 'release/2.1' => 'release/2.2' (#4577)
* Workaround problems when opening solution files in Visual Studio (#4569)

Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore

* Convert Session to use Reference and move to Middleware folder (#4576)

* Add RoutingSample.Web to HttpAbstractions.sln
2018-12-11 16:13:20 -08:00
Nate McMaster 719ff08409
Add RoutingSample.Web to HttpAbstractions.sln 2018-12-11 14:58:05 -08:00
Nate McMaster 5151e7b1ed
Workaround problems when opening solution files in Visual Studio (#4569)
Changes:

* Condense Routing.sln into HttpAbstractions.sln
* Workaround NU1105 by adding all ProjectReferences to the .sln
* Workaround exceptions in the ReferencesHostBridge by moving Reference items to a temporary item group
* Add a 'startvs.cmd' script for launching VS with the right env variables
* Remove RangeHelper test project
* Move RangeHelper tests into StaticFiles.Tests and add target for NPM restore
2018-12-11 14:05:21 -08:00
Nate McMaster 569a14ecb8
Merge branch 'release/2.1' into release/2.2 2018-12-06 17:09:03 -08:00
Nate McMaster 5c2a701b38
Remove conditional targetframeworks from routing projects (#4476) 2018-12-06 12:21:05 -08:00
Nate McMaster 50bea05918
Refactor Routing to use ProjectReference and move into src/Http folder (#4441)
Changes:

* Stop producing Microsoft.AspNetCore.Routing.DecisionTree.Sources. I could not find any usages outside of the Microsoft.AspNetCore.Routing assembly, so I've moved this to be a subfolder of code in the Microsoft.AspNetCore.Routing project.
* Stop building src/Routing as a submodule. Use ProjectReference instead
* Move projects from src/Routing into src/Http/Routing/ and src/Http/Routing.Abstractions/
* Update package baselines and dependencies to support building routing projects and samples
2018-12-05 22:14:22 -08:00
Nate McMaster 0f64aa5c01
Merge aspnet/HttpAbstractions release/2.2 2018-11-20 09:15:59 -08:00
Nate McMaster 0063d5a031
Reorganize source code in preparation to move into aspnet/AspNetCore
Prior to reorganization, this source code was found in 91db78cf92
2018-11-20 08:37:32 -08:00
Nate McMaster 4fcc8b9902
Update targets to build HttpAbstractions projects 2018-11-19 21:34:26 -08:00
Nate McMaster 0ef9993f46
Reorganize source code in preparation to move into aspnet/AspNetCore
Prior to reorganization, this source code was found in d142d58eb4
2018-11-19 21:12:01 -08:00