-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add log about browser tab sleeping #34008
Conversation
@BrennanConroy does this also affect Blazor? (FYI @SteveSandersonMS) |
I assume you're still using the SignalR typescript client, so yes :) |
cc @kg @pavelsavara |
I think we should definitely integrate this, but it's unfortunate that Firefox doesn't support it. On the other hand, FF is less aggressive about pausing than Chrome right now. |
Other than the obvious ones like potential deadlocking if you use multiple locks and that the feature is experimental, I don't know of any caveats.
No idea, I briefly talked to the Edge team and they didn't say not to use it, and that the heuristics they use probably wont remove WebLocks. |
I don't think this is a good idea. I can't articulate why as yet, but my Spidey sense tells me that this is a bad idea. |
Note that from what I can tell from reading the relevant docs, this will only prevent the tab from being put to sleep (i.e. fully unloaded), and won't necessarily stop timers from being throttled down to a lower frequency. It's still worthwhile to avoid having the tab go to sleep either way. One thing is that there are some applications that probably won't want to have a WebLock active while they're waiting for things to happen, while other apps do want it. We may need to find a way to have the application author signal this. |
Another option is we don't make any code changes and document how users can workaround the sleeping tabs issue in their own code. Although, I would then keep the freeze event listener and potentially add a note about the docs. |
i like @BrennanConroy's suggestion. If @davidfowl (and @shirhatti) are iffy on this approach, let's wait and doc it. |
I much prefer the documentation suggestion rather than baking this into our library. We'll learn about the warts in a way that's possible for customers to work around. |
Users are significantly inconvenienced by the current state of things, and it's possible for us to mitigate it through some library changes, but I agree that it's not necessarily right to bake in web locks. |
8d7d102
to
5f5cffd
Compare
Updated to just be a log |
Ping, look at dotnet/AspNetCore.Docs#22773 too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to understand the old comments and then I realized this used to be the WebLock PR 😄.
@BrennanConroy Please forgive me if this is the wrong place to ask... |
Hi @samuelwine. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
In reaction to #33970
Added the freeze event handler log. (Thanks Sourabh)