[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.nebula] Re: Cache images system for Gallery widget

Hi,

What kind of cache do you need exactly ?

I've implemented several levels of caching in ShareMedia which was the original project of the Gallery widget (http://blog.richeton.com/sharemedia).

Basically, I use a reference counting service on images, which keeps images in memory a few seconds after all references have been released. This saves a lot of image loading because I'm able to reuse a lot of them from memory.

On the Gallery side, I have a custom image renderer which uses a size-limited cache based on the reference counting service. I set a maximum number of image for the gallery (let's say 400). The cache keeps references on images. When more image are loaded, the references on the older ones are released. This way, only images which stay out of the client  view for several seconds get disposed.

I'm in the process of releasing this service/cache as a separate project. Help is welcome :)

--
Nicolas