Bug 147631

Summary: Network cache fetches should have timeout
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, cdumez, cgarcia, commit-queue, kling, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch kling: review+

Description Antti Koivisto 2015-08-04 09:54:10 PDT
System might be under heavy I/O pressure. If it takes long time to get data from disk we should load from network instead.
Comment 1 Chris Dumez 2015-08-04 10:15:01 PDT
I am a little bit skeptical about this. Fetching from the network in general is very slow (outside simulated tests) and bad for battery life.
Comment 2 Antti Koivisto 2015-08-04 11:43:59 PDT
Created attachment 258192 [details]
patch
Comment 3 Antti Koivisto 2015-08-04 11:47:50 PDT
(In reply to comment #1)
> I am a little bit skeptical about this. Fetching from the network in general
> is very slow (outside simulated tests) and bad for battery life.

We have spintraces where system is crawling because heavy I/O load (generally systems with spinning disks). It is better to keep the browser functional. The timeout is very long (1s) should not get hit under any normal circumstances.
Comment 4 Andreas Kling 2015-08-04 23:03:47 PDT
Comment on attachment 258192 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=258192&action=review

r=me
At first I was skeptical. But 1 second timeout on disk read -- okay, we're pretty damn hosed.

> Source/WebKit2/ChangeLog:10
> +        This patch introduces 1s second timeout for disk reads. If the last dispatched cache read takes longer than that we cancel all

"1s second timeout"
Comment 5 Antti Koivisto 2015-08-05 03:28:08 PDT
http://trac.webkit.org/changeset/187958 (with 1.5s timeout)