Re: Whiteboard cacheing



On Fri, 2005-04-29 at 11:25 +0200, Alexander Larsson wrote:
> On Fri, 2005-04-29 at 10:20 +0200, Alexander Larsson wrote:
> > The whiteboard cache changes didn't build for me, so i commited a fix
> > that I think will work. Its untested though, because i can't seem to
> > deploy without getting an OOM error atm.
> > 
> > Also, thinking about the caching during the night, wouldn't it make more
> > sense to actually cache the png images on disk? That way we'd use less
> > memory, let the kernel handle when and what to cache, and its still
> > faster to read the thumbnail file from disk than regenerating the full
> > image and then scaling it down. Especially since every client will be
> > reading every thumbnail.
> 
> Also, looking at the current code it seems to not also create the
> thumbnail when rendering the full image. It really should, because if
> you load the full image you will always also need the thumbnail one, and
> having to render the fullscale image twice (with the 1 megabyte
> temporary buffers and other stuff being generated) is bad.
> 
> In fact, since after drawing a stroke the client is guaranteed to
> request it i think it would make sense to render the initial versions in
> the addStroke method call to avoid races for in what order to draw
> thumbnail/full image.

Oh, i just noticed that we actually cache the full sized image in order
to not redraw it again for the thumbnail. This is very bad, as this is
very large (about one meg), while the pngs are very small (about 5-10K
for a full image). 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a leather-clad coffee-fuelled librarian haunted by an iconic dead 
American confidante She's a strong-willed Bolivian bounty hunter from beyond 
the grave. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]