[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40355: [PATCH] Implement caching for libravatar lookup
From: |
Philip K. |
Subject: |
bug#40355: [PATCH] Implement caching for libravatar lookup |
Date: |
Wed, 01 Apr 2020 12:34:34 +0200 |
Robert Pluim <rpluim@gmail.com> writes:
> 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 :-)
It's not needed, but as soon as it is pre-populated the user experience
becomes a lot better. But unless there's a sensible way to fix it, I'll
just resubmit the patch without the optional argument :/
--
Philip K.