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+=yRU+nRBar6fecZKKenFyOgJWDf2DOyFD0gGKz86Lpvg@mail.gmail.com
Whole thread Raw
In response to test_json_parser/002_inline is kind of slow  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: test_json_parser/002_inline is kind of slow
Re: test_json_parser/002_inline is kind of slow
List pgsql-hackers
On Fri, Sep 26, 2025 at 8:12 AM Robert Haas <robertmhaas@gmail.com> wrote:
> Basically anything that would allow us to do multiple tests
> without having to fork a new process for every single one seems like
> it would probably save quite a bit.

Agreed, it's pretty inefficient. (For comparison, it runs in about two
seconds on my machine, so I hadn't noticed how bad it had gotten.
Thanks for pointing it out.)

The hammer I had available at the time was
Perl-plus-compiled-executable. But I've just recently added a C-based
TAP suite in 4e1e417330d4, so I could try to port this suite over in
that direction. (Or I could find a way to port it to pytest... but C
seems like a better fit for testing the parser, in part because it'll
be more easily fuzzable that way.)

--Jacob



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Avoiding roundoff error in pg_sleep()
Next
From: Andres Freund
Date:
Subject: Re: test_json_parser/002_inline is kind of slow