Closed michaelstonis closed 4 months ago
Thank you, and sorry for the delayed response. First of all, I want to maintain Singleton instead of Scoped. Since TimeProvider is a generic type, injecting it outside the scope of Blazor with Scoped causes issues. Therefore, I made it obtain SynchronizationContext.Current each time. A specific problematic case we encountered is coexistence with YARP. https://github.com/microsoft/reverse-proxy/blob/e672f151e1a1104a849bb24d9be94bf30dac63c9/src/ReverseProxy/Management/ReverseProxyServiceCollectionExtensions.cs#L32
I think the FrameProvider using polling is good since it's implemented for other frameworks as well.
In
Blazor
there wasn't support for a FrameProvider. This adds support using theTimerFrameProvider
. This appears to work out okay for the Blazor project and makes it so that features likeEveryValueChanged
are available. I am not sure if there are any downsides to adding this registration or if it could cause an overhead processing issue.Ambient CPU usage doesn't seem to be greatly impacted.