Idea about emoticon cache

zhang kai kylerzhang11 at gmail.com
Mon Mar 19 03:21:09 EDT 2012


2012/3/19 Jorge Villaseñor <salinasv at gmail.com>

> Hi, this is a nice idea.
>
> On Sun, Mar 18, 2012 at 11:47 AM, zhang kai <kylerzhang11 at gmail.com>
> wrote:
> <snip>
> > I consider to save all emotions into a single zip compressed file. The
> file
> > is formatted like this:
>
> Emoticons are images which most of the time are already compressed. Is
> there a reason to have them stored in a single zip file? Don't  you
> think it would be easier to avoid some of the functionality of  Stage3
> by just having the emoticons stored in a dir where the user can easily
> fetch the image?
>

I considered to save all the emoticons in a dir at first. Because people
sometimes use a lot of small size emoticons, then I thought to compress all
the emoticons into a single file to save some space. Now I think both ways
are workable.
For the export and import functionality of Stage3, I think it's better to
let user interact with emoticon cache through Pidgin GUI so they   wouldn't
need to know how Pidgin cache works at back-end. And if we changed the way
Pidgin stores emoticons user wouldn't notice that.
Another reason I consider to export emoticons into a compressed file is
that this way allow people easily pack some emoticon under a same theme(or
something like that) into a single file and share it with others.

>

<snip>
>
> > When a cache file's size hit the maximum limit, pidgin need to remove
> some
> > not so frequently used emoticons for new emoticon to be added. So in the
> > emoticon index, I consider add a count attribute to enable pidgin to
> choose
> > which emoticon to remove. Then the emoticon index is like this:
> >
> >
> > emoticon URI<CR><LF>offset<CR><LF>size<CR><LF>count<CR><LF>
>
> I think it is better to have a "frequency" value than a count. I mean
> count/time instead of just time.


Indeed, the count value is too simple. I think to have a frequency value is
good, and LRU, LFU algorithms also could be considered.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pidgin.im/pipermail/devel/attachments/20120319/de71791d/attachment-0002.html>


More information about the Devel mailing list