Re: test_json_parser/002_inline is kind of slow - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: test_json_parser/002_inline is kind of slow
Date
Msg-id CAOYmi+=3EjEF+RjSohe4Y5N_xrmOhjfa=026eOAKTtwMsCMn1g@mail.gmail.com
Whole thread Raw
In response to Re: test_json_parser/002_inline is kind of slow  (Andres Freund <andres@anarazel.de>)
Responses Re: test_json_parser/002_inline is kind of slow
List pgsql-hackers
On Fri, Sep 26, 2025 at 9:01 AM Andres Freund <andres@anarazel.de> wrote:
> On 2025-09-26 08:49:51 -0700, Jacob Champion wrote:
> > Yeah, but that doubles down on the bad unit test architecture... and I
> > don't think anyone would want to touch that code after I wrote it.
>
> I don't really understand - what I'm proposing should just be a few lines?
> Splitting on some separator is hardly hard to understand code.

If it's truly just a few lines, then I've misunderstood what you're
suggesting (patches welcome). It's not the separator splitting that
I'm worried about, but the restructuring of the test.

> ISTM that the test vectors and the patttern matching on them in 002_inline.pl
> makes much more sense in a scripting language than in a C file.

It would be on me to prove it, but I don't recall the patterns really
being used all that much. And the inputs are all constant strings.

Thanks,
--Jacob



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] GROUP BY ALL
Next
From: Masahiko Sawada
Date:
Subject: Re: Remove unused for_all_tables field from AlterPublicationStmt