All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] name-rev: improve memory usage
@ 2020-02-04 21:12 René Scharfe
  2020-02-04 21:14 ` [PATCH 01/10] name-rev: rewrite create_or_update_name() René Scharfe
                   ` (12 more replies)
  0 siblings, 13 replies; 27+ messages in thread
From: René Scharfe @ 2020-02-04 21:12 UTC (permalink / raw)
  To: Git Mailing List; +Cc: SZEDER Gábor, Martin Ågren, Junio C Hamano

This series seeks to get reduce the size of memory allocations, the
number of reallocations and the amount of leaks in git name-rev, to
improve its performance.  It starts with a few cleanups:

Martin Ågren (1):
  name-rev: rewrite create_or_update_name()

René Scharfe (9):
  name-rev: remove unused typedef
  name-rev: respect const qualifier
  name-rev: don't _peek() in create_or_update_name()

... then plugs a minor leak:

  name-rev: don't leak path copy in name_ref()

... and gets rid of a level of indirection in commit slab usage:

  name-rev: put struct rev_name into commit slab

The next two patches eliminate reallocations while building name strings
for parent commits, which can make a surprisingly big difference in some
cases:

  name-rev: factor out get_parent_name()
  name-rev: pre-size buffer in get_parent_name()

The next one avoids building names that are be discarded right away by
checking first if they are better than a possibly present other name
assigned earlier, which only provides a small speedup, but is the right
thing to do:

  name-rev: generate name strings only if they are better

And finally a tricky one whose commit message is a lot longer than its
diff, which adds a bit of overhead and which probably needs the most
reviewer attention to make sure it won't cause double frees:

  name-rev: release unused name strings

 builtin/name-rev.c | 133 ++++++++++++++++++++++++++-------------------
 1 file changed, 76 insertions(+), 57 deletions(-)

--
2.25.0

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2020-02-05 18:55 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 21:12 [PATCH 00/10] name-rev: improve memory usage René Scharfe
2020-02-04 21:14 ` [PATCH 01/10] name-rev: rewrite create_or_update_name() René Scharfe
2020-02-05  2:00   ` Derrick Stolee
2020-02-05  2:35     ` Taylor Blau
2020-02-05 16:45   ` Andrei Rybak
2020-02-05 16:47     ` René Scharfe
2020-02-04 21:15 ` [PATCH 02/10] name-rev: remove unused typedef René Scharfe
2020-02-04 21:16 ` [PATCH 03/10] name-rev: respect const qualifier René Scharfe
2020-02-04 21:17 ` [PATCH 04/10] name-rev: don't leak path copy in name_ref() René Scharfe
2020-02-05 14:35   ` Derrick Stolee
2020-02-04 21:20 ` [PATCH 05/10] name-rev: don't _peek() in create_or_update_name() René Scharfe
2020-02-04 21:22 ` [PATCH 06/10] name-rev: put struct rev_name into commit slab René Scharfe
2020-02-04 21:23 ` [PATCH 07/10] name-rev: factor out get_parent_name() René Scharfe
2020-02-04 21:24 ` [PATCH 08/10] name-rev: pre-size buffer in get_parent_name() René Scharfe
2020-02-05  3:19   ` Derrick Stolee
2020-02-05 15:16     ` René Scharfe
2020-02-04 21:25 ` [PATCH 09/10] name-rev: generate name strings only if they are better René Scharfe
2020-02-05 15:11   ` Derrick Stolee
2020-02-05 15:50     ` René Scharfe
2020-02-04 21:26 ` [PATCH 10/10] name-rev: release unused name strings René Scharfe
2020-02-05 15:19   ` Derrick Stolee
2020-02-05  3:28 ` [PATCH 00/10] name-rev: improve memory usage Derrick Stolee
2020-02-05 15:20   ` Derrick Stolee
2020-02-05 17:19 ` [PATCH 01/10 RESEND AUTHOR FIXED] name-rev: rewrite create_or_update_name() René Scharfe
2020-02-05 17:50 ` [PATCH 11/10] name-rev: sort tip names before applying René Scharfe
2020-02-05 18:23   ` Junio C Hamano
2020-02-05 18:55     ` René Scharfe

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.