git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Pierre Habouzit <madcoder@debian.org>
To: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC] strbuf's in builtin-apply
Date: Sun, 16 Sep 2007 19:21:34 +0200	[thread overview]
Message-ID: <20070916172134.GA26457@artemis.corp> (raw)
In-Reply-To: <20070915141210.GA27494@artemis.corp>

[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]

Following this mail will happen a new janitoring series. This is a
rewrite of the former, using Junio's advice to use strbufs in
convert_to_* functions. The patch hence becomes more intrusive than
before (in convert.c mostly). Note that this imply that now strbuf.h is
included from cache.h so all git sources see strbuf's.

The convert_to_git patches gain some marginal efficiency as the new API
makes the reuse of the buffers possible when in-place editing works
(e.g. the \r\n -> \n can be done in place, we save a malloc here). Else
nothing should have changed significantly.

The last 2 patches are new. The first one is a simplification of the
code splicing the "encoding" header in commit.c, reusing the logic
already in strbuf.c for that matter, and also making the parsing code
easier to read (IMHO).

The latter further simplify some code that was trying to guess if
rfc2047 encoding of some header was needed. Thanks to strbuf_grow, and
the fact that now at each point we can grow buffers (which was harder
before), I tried to wait until we are sure if rfc2047 encoding will be
needed or not to extend the buffer. I've benchmarked many tools (on real
repositories, with commiters having non ascii chars in their name) using
the pretty printer without noticeable changes in the numbers (and rather
again, a trend to be faster, but with less than a percent gain, so I
won't call it a real gain).

The series is based on next, as many patches are definitely not suitable
for master :)

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2007-09-16 17:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-15 14:12 [RFC] strbuf's in builtin-apply Pierre Habouzit
2007-09-15 13:56 ` [PATCH] New strbuf APIs: splice and embed Pierre Habouzit
2007-09-16  0:57   ` Junio C Hamano
2007-09-16  8:10     ` Pierre Habouzit
2007-09-15 14:04 ` [PATCH] builtin-apply: use strbuf's instead of buffer_desc's Pierre Habouzit
2007-09-16  0:56   ` Junio C Hamano
2007-09-16  8:15     ` Pierre Habouzit
2007-09-15 17:07 ` [RFC] strbuf's in builtin-apply Pierre Habouzit
2007-09-16 17:21 ` Pierre Habouzit [this message]
2007-09-15 13:56   ` [PATCH] New strbuf APIs: splice and attach Pierre Habouzit
2007-09-16 20:20     ` Florian Weimer
2007-09-16 20:51       ` Pierre Habouzit
2007-09-17  5:43         ` Florian Weimer
2007-09-15 13:56   ` [PATCH] Now that cache.h needs strbuf.h, remove useless includes Pierre Habouzit
2007-09-15 21:50   ` [PATCH] Refactor replace_encoding_header Pierre Habouzit
2007-09-16  8:19   ` [PATCH] Remove preemptive allocations Pierre Habouzit
2007-09-16 13:51   ` [PATCH] Rewrite convert_to_{git,working_tree} to use strbuf's Pierre Habouzit
2007-09-16 18:27     ` Linus Torvalds
2007-09-16 16:54   ` [PATCH] builtin-apply: use strbuf's instead of buffer_desc's Pierre Habouzit
2007-09-16 17:28   ` [RFC] strbuf's in builtin-apply Pierre Habouzit
2007-09-16 22:54     ` Junio C Hamano

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: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20070916172134.GA26457@artemis.corp \
    --to=madcoder@debian.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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://80x24.org/mirrors/git.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).