From: Michal Sojka <sojkam1@fel.cvut.cz>
To: Jesse Rosenthal <jrosenthal@jhu.edu>, notmuch@notmuchmail.org
Subject: Re: Remote usage script updated
Date: Fri, 11 Feb 2011 07:55:29 +0100 [thread overview]
Message-ID: <877hd712n2.fsf@steelpick.2x.cz> (raw)
In-Reply-To: <m1k4h8syhi.fsf@watt.hwcampus.jhu.edu>
On Wed, 09 Feb 2011, Jesse Rosenthal wrote:
> By the way, I've also realized that most attachment downloading is done
> not by "--format=raw" but by "notmuch part". It's possible to do caching
> there as well. There are a few options there:
>
> * One option would be to just cache by the attachment number -- but
> this is very fragile if you delete an attachment through mutt or
> some other client that allows it.
This is obviously the simplest possibility. I do not know how often do
you (and others) delete attachments, but I do it rarely and usually I
delete all the attachments of the messages older than something. So this
would work for me.
Additionally, I have added the following command to the attachment
fetching code:
find ${CACHE} -ctime +$CACHE_MAX_DAYS -and -mtime +$CACHE_MAX_DAYS -print0 | xargs -r -0 rm -f
It deletes attachments older than one week (in my case) so it there is
some inconsistency, it would not last more than one week.
> * cache by the hash of the attachment. The idea is that asking the
> server to fetch it, hash it, and send the hash would still save
> time over sending the whole attachment. Probably -- though most
> attachments are small enough and most connections are fast enough
> that this might not actually matter.
If people do more weird things with their attachments, this is probably
the best solution.
> * Actually stick the attachment hash in the json output in the first
> place. But this would be a lot of trouble for a small gain for
> very few.
Agreed.
-Michal
next prev parent reply other threads:[~2011-02-11 6:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 15:51 Remote usage script updated Jesse Rosenthal
2011-01-28 2:54 ` Carl Worth
2011-01-28 20:10 ` Jesse Rosenthal
2011-02-05 7:38 ` Michal Sojka
2011-02-05 23:58 ` Michal Sojka
2011-02-09 21:13 ` Jesse Rosenthal
2011-02-11 6:55 ` Michal Sojka [this message]
2011-02-15 21:42 ` Michal Sojka
2011-03-03 16:38 ` Kristoffer Ström
2011-03-04 20:38 ` Jesse Rosenthal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877hd712n2.fsf@steelpick.2x.cz \
--to=sojkam1@fel.cvut.cz \
--cc=jrosenthal@jhu.edu \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).