NEW269806
Web process cache expiration logic looks wrong
https://bugs.webkit.org/show_bug.cgi?id=269806
Summary Web process cache expiration logic looks wrong
Michael Catanzaro
Reported 2024-02-20 12:55:05 PST
In bug #262780 I noticed that the code for expiring web processes from the web process cache is a little weird: """ One odd thing I notice is that the 30 minute cache lifetime applies only if the application remains "active" as determined by NSApplicationDidBecomeActiveNotification and NSApplicationDidResignActiveNotification. That is, if the user ever focuses another application on Cocoa platforms, then the 5 minute lifetime applies forevermore. In practice, this means that users who Alt+Tab to another application once every 5 minutes are going to see the 5 minute cache lifetime. It is not hooked up to focus change events on WPE/GTK, so Linux users always get the 30 minute cache. I wonder if the intended behavior was to have two separate timers, on 30 minute timer and one 5 minute timer, where the cache gets evicted only if application remains unfocused for 5 minutes. Changing the cache lifetime based on whether the application is unfocused for any amount of time doesn't make sense to me. """ """ Hm, it looks like, on Apple platforms, processes will be cached indefinitely if the user unfocuses the window, refocuses it (so it becomes active, causing the eviction timer to stop), and does not leave it unfocused for more than 5 minutes (which restarts the 5 minute timer). I seriously doubt this is the desired design. Hi Chris, do you want a bug report for this? Maybe I'm missing something? """
Attachments
Radar WebKit Bug Importer
Comment 1 2024-02-27 12:55:18 PST
Note You need to log in before you can comment on or make changes to this bug.