[Twisted-web] Off topic: streaming animated GIFs

Andrew Bennetts andrew-twisted at puzzling.org
Tue Dec 20 21:28:11 MST 2005

On Tue, Dec 20, 2005 at 03:07:49PM -0500, Mike Pelletier wrote:
> On Sun December 18 2005 04:22, Tommi Virtanen wrote:
> > the old school
> > way is to have the bar graph as a GIF with more than one frame, and
> > stream the frames whenever you want to update the picture; that keeps
> > a single connection open to the server, pushing more data exactly when
> > you want to. Of course, it is limited to updating 1-4 GIF images.
> This is a really great idea!  Are there any gotchas that should be mentioned?  
> Does the GIF header not specify the number of frames?  And even if the GIF 
> isn't looped, would browsers be smart enough to discard data from previous 
> frames?  It seems like it might cause what would effectively be a memory leak 
> on the browser.

Yep, I believe it does slowly eat memory.  In theory browsers could discard old
frames, but I don't think any are smart enough to.

Of course, I've no idea if more modern AJAX stuff is any better in practice ;)


More information about the Twisted-web mailing list