Bug 35065 - Delay between page loading and animated GIF playing
Summary: Delay between page loading and animated GIF playing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.6
: P2 Normal
Assignee: Peter Kasting
URL: http://i.imgur.com/Zgc5p.gif
Keywords: InRadar
Depends on: 35115
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-17 17:56 PST by Mark Rowe (bdash)
Modified: 2010-02-18 11:03 PST (History)
2 users (show)

See Also:


Attachments
Patch v1 (4.70 KB, patch)
2010-02-17 18:06 PST, Mark Rowe (bdash)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rowe (bdash) 2010-02-17 17:56:50 PST
When doing an uncached load of <http://i.imgur.com/Zgc5p.gif> there is a delay of around 5 seconds after the image finishes loading before the animation starts running.

<rdar://problem/7109548>
Comment 1 Mark Rowe (bdash) 2010-02-17 18:06:05 PST
Created attachment 48955 [details]
Patch v1

This appears to address the issue.
Comment 2 Mark Rowe (bdash) 2010-02-17 18:08:00 PST
CCing Mr Peter Kasting as he did a lot of work on this code back in the day.
Comment 3 Mark Rowe (bdash) 2010-02-17 18:19:52 PST
Fixed in r54919.
Comment 4 Peter Kasting 2010-02-17 19:19:48 PST
The old code was definitely way wrong.  Thanks for fixing!

The new patch has a small bug: the first time through, when the desired frame start time is zero, we should set the desired start time immediately.  Otherwise the GIF start lags by the amount of time needed to decode the second frame.  This is minor, but can make a difference on sites like YTMND.  I'll write a patch for this.
Comment 5 Peter Kasting 2010-02-17 19:20:13 PST
Comment on attachment 48955 [details]
Patch v1

Clearing flags on this patch, as it has landed.
Comment 6 Mark Rowe (bdash) 2010-02-17 21:07:39 PST
(In reply to comment #4)
> The old code was definitely way wrong.  Thanks for fixing!
> 
> The new patch has a small bug: the first time through, when the desired frame
> start time is zero, we should set the desired start time immediately. 
> Otherwise the GIF start lags by the amount of time needed to decode the second
> frame.  This is minor, but can make a difference on sites like YTMND.  I'll
> write a patch for this.

Please file a new bug.  That’s clearly a different issue than what this bug was about, so repurposing it for that doesn’t seem sensible.