Bug 269806
| Summary: | Web process cache expiration logic looks wrong | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | kkinnunen, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=262780 | ||
Michael Catanzaro
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/123710228>