GNU bug report logs -
#40355
[PATCH] Implement caching for libravatar lookup
Previous Next
Reported by: Philip K <philip <at> warpmail.net>
Date: Tue, 31 Mar 2020 18:04:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 40355 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim <rpluim <at> gmail.com> writes:
>>>>>> On Tue, 31 Mar 2020 20:03:36 +0200, Philip K <philip <at> warpmail.net> said:
>
> I doubt you need the 'cache' arg, you can keep the cache purely
> internal.
I added it because I was considering defining gravatar-libravatar-cache
as
(let ((cache (make-hash-table :test 'equal)))
(dolist (domain '("aol.com" "att.net" "comcast.net" "facebook.com"
"gmail.com" "gmx.com" "googlemail.com" "google.com"
"hotmail.com" "hotmail.co.uk" "mac.com" "me.com"
"mail.com" "msn.com" "live.com" "sbcglobal.net"
;; ...
))
(gravatar--service-libravatar (concat "ignored@" domain) cache))
cache)
with a few popular domains. The only issue is that evaluating it takes
forever.
> How big is this cache likely to get? Perhaps use a weak hash table?
I haven't managed to gather good real-world data yet, but I would assume
something along the lines of 50-200 domains?
--
Philip K.
This bug report was last modified 4 years and 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.