git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Subject: [PATCH 00/10] reftable: drop generic `reftable_table` interface
Date: Tue, 13 Aug 2024 08:24:00 +0200	[thread overview]
Message-ID: <cover.1723528765.git.ps@pks.im> (raw)

Hi,

this patch series performs some simplification of the reftable library
by dropping the generic `reftable_table` interface. The intent of this
interface is to abstract away whether the underlying table is either a
single reftable, or a merged reftable. Arguably though, it is not needed
anymore starting with my recent refactorings [1] that made the reftable
iterator itself seekable, as that now provides such a generic interface
already.

So this patch series rips out the `reftable_table` interface, both to
remove unused clutter, but more importantly to make the reftable library
easier to understand overall. There is also a tiny performance gain of
1-3% by requiring one less vtable function call. But while that speedup
is consistent, I didn't include any benchmarks as it is rather close to
noise and not the primary motivation of this patch series.

Patrick

[1]: <cover.1715166175.git.ps@pks.im>

Patrick Steinhardt (10):
  reftable/merged: expose functions to initialize iterators
  reftable/merged: rename `reftable_new_merged_table()`
  reftable/merged: stop using generic tables in the merged table
  reftable/stack: open-code reading refs
  reftable/iter: drop double-checking logic
  reftable/generic: move generic iterator code into iterator interface
  reftable/dump: drop unused `compact_stack()`
  reftable/dump: drop unused printing functionality
  reftable/dump: move code into "t/helper/test-reftable.c"
  reftable/generic: drop interface

 Makefile                         |   2 -
 reftable/dump.c                  | 111 ---------------
 reftable/generic.c               | 229 -------------------------------
 reftable/generic.h               |  37 -----
 reftable/iter.c                  | 127 ++++++++++++++---
 reftable/iter.h                  |  30 +++-
 reftable/merged.c                |  72 ++++------
 reftable/merged.h                |   4 +-
 reftable/reader.c                |  70 +---------
 reftable/reader.h                |   4 +
 reftable/record.c                | 127 -----------------
 reftable/record.h                |   4 -
 reftable/reftable-generic.h      |  47 -------
 reftable/reftable-merged.h       |  26 ++--
 reftable/reftable-reader.h       |   9 --
 reftable/reftable-record.h       |   8 --
 reftable/reftable-stack.h        |   3 -
 reftable/stack.c                 |  94 ++++++-------
 reftable/stack_test.c            |  29 ++--
 t/helper/test-reftable.c         |  47 ++++++-
 t/unit-tests/t-reftable-merged.c |  17 +--
 21 files changed, 281 insertions(+), 816 deletions(-)
 delete mode 100644 reftable/dump.c
 delete mode 100644 reftable/generic.c
 delete mode 100644 reftable/generic.h
 delete mode 100644 reftable/reftable-generic.h

-- 
2.46.0.46.g406f326d27.dirty


             reply	other threads:[~2024-08-13  6:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13  6:24 Patrick Steinhardt [this message]
2024-08-13  6:24 ` [PATCH 01/10] reftable/merged: expose functions to initialize iterators Patrick Steinhardt
2024-08-13  9:36   ` karthik nayak
2024-08-14 12:56     ` Patrick Steinhardt
2024-08-19 16:55   ` Justin Tobler
2024-08-20 12:00     ` Patrick Steinhardt
2024-08-13  6:24 ` [PATCH 02/10] reftable/merged: rename `reftable_new_merged_table()` Patrick Steinhardt
2024-08-13  6:24 ` [PATCH 03/10] reftable/merged: stop using generic tables in the merged table Patrick Steinhardt
2024-08-13  9:58   ` karthik nayak
2024-08-19 16:47   ` Justin Tobler
2024-08-13  6:24 ` [PATCH 04/10] reftable/stack: open-code reading refs Patrick Steinhardt
2024-08-13  6:24 ` [PATCH 05/10] reftable/iter: drop double-checking logic Patrick Steinhardt
2024-08-13  6:57   ` Eric Sunshine
2024-08-13  6:24 ` [PATCH 06/10] reftable/generic: move generic iterator code into iterator interface Patrick Steinhardt
2024-08-13 10:04   ` karthik nayak
2024-08-14 12:56     ` Patrick Steinhardt
2024-08-14 16:24     ` Junio C Hamano
2024-08-15 11:04       ` karthik nayak
2024-08-13  6:24 ` [PATCH 07/10] reftable/dump: drop unused `compact_stack()` Patrick Steinhardt
2024-08-13  6:24 ` [PATCH 08/10] reftable/dump: drop unused printing functionality Patrick Steinhardt
2024-08-13 10:14   ` karthik nayak
2024-08-14 12:56     ` Patrick Steinhardt
2024-08-13  6:24 ` [PATCH 09/10] reftable/dump: move code into "t/helper/test-reftable.c" Patrick Steinhardt
2024-08-13  6:24 ` [PATCH 10/10] reftable/generic: drop interface Patrick Steinhardt
2024-08-13 10:17 ` [PATCH 00/10] reftable: drop generic `reftable_table` interface karthik nayak

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=cover.1723528765.git.ps@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.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 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 NNTP newsgroup(s).