unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH 0/3] Outline fix for emacs tagging race
Date: Fri, 09 Nov 2012 23:25:58 +0200	[thread overview]
Message-ID: <m2mwyqjwnt.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <1352487491-31512-1-git-send-email-markwalters1009@gmail.com>

On Fri, Nov 09 2012, Mark Walters <markwalters1009@gmail.com> wrote:

>
> This patch series implements the above mentioned solution and seems to
> work except for one problem.
>
> Since emacs now tags each message in a thread in the search buffer it
> is easy to ask it to tag a lot of messages. This could be done
> individually which would be ridiculously slow so instead they are all
> done in one batch. But now it is relatively easy to take notmuch over
> the threshold for ARG_MAX.
>
> In [3] Tomi did some experiments and found on a standard Debian system
> with getconf ARG_MAX =131072 that command lines with 10000 200 byte
> arguments worked. I am a little puzzled by that as I get the same
> results and I getconf ARG_MAX gives 2097152 for me.
>
> More importantly though, when trying to execute a command from emacs I
> am finding that 131072 is the limit on the command length in bytes and
> we can hit this with something around 1500 messages (see end for a
> very hacky emacs test script). This is probably more than we can
> expect in a single thread so tagging from show is probably safe but it
> does cause a problem when tagging from search.

That's because your test script below constructs one very loooong
string (and used just one arg). Like you said, [3] used 10000 200-char args.

This test script is more like what the perl(1) script did in [3]

(progn
  (setq arglist '("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"))
  (setq n 10000)
  (while (> n 0)
    (setq n (1- n))
    (setq arglist (cons "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" arglist)))

  (apply 'call-process "/bin/echo" nil t nil arglist))

(except that the args here are just 80 chars but you should get the point :)


I did not check your patches yet.. buf if you concatenate there you 
could try to provide those as separate args...

... then we can experiment how notmuch (and xapian) copes with thosew
IIRC notmuch will concatenate one long string out of those and do
xapian stuff using that (but then we're not limited by command line
arguments restrictions).

>
> Best wishes 
>
> Mark

Tomi

>
> [3] id:m2liody7av.fsf@guru.guru-group.fi

> TEST SCRIPT

> (progn
>   (setq bigstring
> "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
>   (setq n 1310)
>   (setq big nil)
>   (while (> n 0)
>    (setq n (1- n))
>     (setq big (concat big (format "%s" n) " " bigstring)))
>   (call-process "echo" nil t nil big))

  parent reply	other threads:[~2012-11-09 21:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-09 18:58 [PATCH 0/3] Outline fix for emacs tagging race Mark Walters
2012-11-09 18:58 ` [PATCH 1/3] test: test for race when tagging from emacs search Mark Walters
2012-11-09 18:58 ` [PATCH 2/3] cli: all search mode to include msg-ids with JSON output Mark Walters
2012-11-22 16:15   ` Jameson Graef Rollins
2012-11-22 18:05     ` Michal Nazarewicz
2012-11-22 19:35     ` Mark Walters
2012-11-23  7:23       ` Jameson Graef Rollins
2012-11-23  9:01         ` Tomi Ollila
2012-11-23 20:39     ` Austin Clements
2012-11-09 18:58 ` [PATCH 3/3] emacs: make emacs use message-ids for tagging Mark Walters
2012-11-09 21:25 ` Tomi Ollila [this message]
2012-11-09 23:27 ` [PATCH 0/3] Outline fix for emacs tagging race David Bremner
2012-11-10  5:29 ` Austin Clements

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=m2mwyqjwnt.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=markwalters1009@gmail.com \
    --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).