All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Goirand <thomas@goirand.fr>
To: mlmmj@mlmmj.org
Subject: Re: [mlmmj] read(2) syscall bloat
Date: Fri, 09 Sep 2011 08:24:39 +0000	[thread overview]
Message-ID: <4E69CD47.7000302@goirand.fr> (raw)
In-Reply-To: <20110905115603.GC22957@barfooze.de>

On 09/05/2011 08:34 PM, Ben Schmidt wrote:
> Maybe we should do some profiling to see if this truly is a bottleneck
> or not.
> 
> Ben.

Without looking, my bet is that it's NOT a bottleneck. Implementing the
buffering yourself is the kind of thing you do *not* want to do, because
it's error prone and can lead very easily to buffer overflow issue. At
least, take the implementation from something that already exists
(ideally, use a known shared lib). Working on this kind of "by hand"
optimization is, IMHO a waste of time, considering all what happens when
receiving a mail.

As a consequence, I vote for using getline() if it's available, and keep
the old (slower) implementation if it's not.

Thomas


      parent reply	other threads:[~2011-09-09  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05 11:56 [mlmmj] read(2) syscall bloat Moritz Wilhelmy
2011-09-05 12:30 ` Lukas Fleischer
2011-09-05 12:34 ` Ben Schmidt
2011-09-05 12:46 ` Lukas Fleischer
2011-09-05 12:57 ` Moritz Wilhelmy
2011-09-09  8:24 ` Thomas Goirand [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E69CD47.7000302@goirand.fr \
    --to=thomas@goirand.fr \
    --cc=mlmmj@mlmmj.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.