Re: test_json_parser/002_inline is kind of slow

2025-11-03 Thread Jacob Champion
On Sun, Nov 2, 2025 at 4:34 AM Mihail Nikalayeu wrote: > Not sure it is related, but probably yes - got weird CI [0] issue on > BSD (patch itself does not change anything may affect that): Thank you for the report! > [19:24:12.744](0.000s) not ok 1802 - unescaped control: stderr has > correct nu

Re: test_json_parser/002_inline is kind of slow

2025-11-02 Thread Mihail Nikalayeu
Hello, everyone! Not sure it is related, but probably yes - got weird CI [0] issue on BSD (patch itself does not change anything may affect that): [19:24:12.727](0.000s) ok 1798 - unknown escape sequence, chunk size 2: correct error output [19:24:12.727](0.000s) ok 1799 - unknown escape sequence,

Re: test_json_parser/002_inline is kind of slow

2025-10-18 Thread Nathan Bossart
On Fri, Sep 26, 2025 at 11:11:52AM -0400, Robert Haas wrote: > I've noticed that when I run 'meson test', the test mentioned in the > subject line is usually the last one to finish. The test runs for 22 > seconds on my machine, which is fairly high considering that 'meson > test' in total (and with

Re: test_json_parser/002_inline is kind of slow

2025-10-18 Thread Tom Lane
Robert Haas writes: > On Sat, Sep 27, 2025 at 12:43 PM Tom Lane wrote: >> I tried it on my Mac M4 laptop, and saw the 002 test dropping from >> 3592 ms to 540 ms, about an 85% savings. So I agree this is worth >> doing. It's still unclear why Robert is seeing times so much worse >> than mine, t

Re: test_json_parser/002_inline is kind of slow

2025-10-18 Thread Jacob Champion
On Mon, Sep 29, 2025 at 8:24 AM Jacob Champion wrote: > Nice! I'll clean this up, and put a rewrite on the back burner for > now. Barring objections, I'll plan to backpatch the attached in a day or so. Thanks, --Jacob v2-0001-test_json_parser-Speed-up-002_inline.pl.patch Description: Binary da

Re: test_json_parser/002_inline is kind of slow

2025-10-17 Thread Jacob Champion
On Fri, Sep 26, 2025 at 8:12 AM Robert Haas 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 seco

Re: test_json_parser/002_inline is kind of slow

2025-10-17 Thread Robert Haas
On Sat, Sep 27, 2025 at 12:43 PM Tom Lane wrote: > I tried it on my Mac M4 laptop, and saw the 002 test dropping from > 3592 ms to 540 ms, about an 85% savings. So I agree this is worth > doing. It's still unclear why Robert is seeing times so much worse > than mine, though. I don't have a clea

Re: test_json_parser/002_inline is kind of slow

2025-10-01 Thread Jacob Champion
On Mon, Sep 29, 2025 at 12:37 PM Jacob Champion wrote: > Barring objections, I'll plan to backpatch the attached in a day or so. Committed. --Jacob

Re: test_json_parser/002_inline is kind of slow

2025-09-29 Thread Jacob Champion
On Mon, Sep 29, 2025 at 8:11 AM Robert Haas wrote: > I don't have a clear explanation for that slowness either, but the > patch cuts down the runtime by 89% on my machine. Nice! I'll clean this up, and put a rewrite on the back burner for now. Thanks everyone for the testing, and thanks Andres fo

Re: test_json_parser/002_inline is kind of slow

2025-09-27 Thread Tom Lane
Andrew Dunstan writes: > On 2025-09-26 Fr 8:06 PM, Jacob Champion wrote: >> Unfortunately it only gives about a 4x speedup on my machine, and I >> was hoping for much more. (We should really expect this entire thing >> to run in a fraction of a second.) >> >> Let me know if you think the tradeoff

Re: test_json_parser/002_inline is kind of slow

2025-09-27 Thread Andrew Dunstan
On 2025-09-26 Fr 8:06 PM, Jacob Champion wrote: On Fri, Sep 26, 2025 at 9:26 AM Jacob Champion wrote: 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.

Re: test_json_parser/002_inline is kind of slow

2025-09-27 Thread Jacob Champion
On Fri, Sep 26, 2025 at 8:48 AM Robert Haas wrote: > Interesting. Are you on Linux? Yeah, this is aarch64 Ubuntu on an M3 Pro. --Jacob

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Jacob Champion
On Fri, Sep 26, 2025 at 9:26 AM Jacob Champion wrote: > 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. Here is a very slapdash attempt at pushing the

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Andres Freund
Hi, On 2025-09-26 10:25:19 -0500, Nathan Bossart wrote: > On Fri, Sep 26, 2025 at 11:11:52AM -0400, Robert Haas wrote: > > I've noticed that when I run 'meson test', the test mentioned in the > > subject line is usually the last one to finish. The test runs for 22 > > seconds on my machine, which

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Jacob Champion
On Fri, Sep 26, 2025 at 9:01 AM Andres Freund 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 prop

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Tom Lane
Robert Haas writes: > On Fri, Sep 26, 2025 at 11:33 AM Jacob Champion > wrote: >> 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.) > Interesting. Are you on Linux? I'm testi

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Andres Freund
Hi, On 2025-09-26 08:49:51 -0700, Jacob Champion wrote: > On Fri, Sep 26, 2025 at 8:38 AM Andres Freund wrote: > > You can just support running multiple tests with one run of the executable, > > e.g. by splitting the input / output on null bytes. > > Yeah, but that doubles down on the bad unit t

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Robert Haas
On Fri, Sep 26, 2025 at 11:50 AM Jacob Champion wrote: > On Fri, Sep 26, 2025 at 8:38 AM Andres Freund wrote: > > You can just support running multiple tests with one run of the executable, > > e.g. by splitting the input / output on null bytes. > > Yeah, but that doubles down on the bad unit tes

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Jacob Champion
On Fri, Sep 26, 2025 at 8:38 AM Andres Freund wrote: > You can just support running multiple tests with one run of the executable, > e.g. by splitting the input / output on null bytes. Yeah, but that doubles down on the bad unit test architecture... and I don't think anyone would want to touch th

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Robert Haas
On Fri, Sep 26, 2025 at 11:33 AM Jacob Champion wrote: > 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.) Interesting. Are you on Linux? I'm testing directly on macOS, and I wo

Re: test_json_parser/002_inline is kind of slow

2025-09-26 Thread Andres Freund
Hi, On 2025-09-26 08:33:08 -0700, Jacob Champion wrote: > On Fri, Sep 26, 2025 at 8:12 AM Robert Haas 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

test_json_parser/002_inline is kind of slow

2025-09-26 Thread Robert Haas
I've noticed that when I run 'meson test', the test mentioned in the subject line is usually the last one to finish. The test runs for 22 seconds on my machine, which is fairly high considering that 'meson test' in total (and with MESON_TESTTHREADS=8) runs for 3 minutes and 13 seconds. I think the