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
View this message in rfc822 format
>>>>> On Tue, 31 Mar 2020 23:30:23 +0200, philip <at> warpmail.net (Philip K.) said:
Philip> 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.
Philip> I added it because I was considering defining gravatar-libravatar-cache
Philip> as
Philip> (let ((cache (make-hash-table :test 'equal)))
Philip> (dolist (domain '("aol.com" "att.net" "comcast.net" "facebook.com"
Philip> "gmail.com" "gmx.com" "googlemail.com" "google.com"
Philip> "hotmail.com" "hotmail.co.uk" "mac.com" "me.com"
Philip> "mail.com" "msn.com" "live.com" "sbcglobal.net"
Philip> ;; ...
Philip> ))
Philip> (gravatar--service-libravatar (concat "ignored@" domain) cache))
Philip> cache)
Philip> with a few popular domains. The only issue is that evaluating it takes
Philip> forever.
Perhaps thatʼs a sign that pre-population is not needed :-)
>> How big is this cache likely to get? Perhaps use a weak hash table?
Philip> I haven't managed to gather good real-world data yet, but I would assume
Philip> something along the lines of 50-200 domains?
OK, I donʼt think thatʼs onerous.
Robert
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.