public inbox for bunsen@sourceware.org
 help / color / mirror / Atom feed
From: "Serhei Makarov" <me@serhei.io>
To: "Keith Seitz" <keiths@redhat.com>
Cc: Bunsen <bunsen@sourceware.org>
Subject: Re: Initial findings of bunsen performance and questions
Date: Mon, 21 Sep 2020 16:08:16 -0400	[thread overview]
Message-ID: <8e645045-04e6-412d-97d2-46a173d2fefa@www.fastmail.com> (raw)
In-Reply-To: <9709c97e-bb12-48dd-2c5c-a9efb35e55d1@redhat.com>

On Fri, Sep 18, 2020, at 12:16 PM, Keith Seitz wrote:
> Yes, I will send you (privately) what I've been benchmarking. This is 
> nearly unaltered
> bunsen repo, but I've added a few simple patches to fix some existing 
> problems.
The repo looked ok, so I compared the time to load 10,000 testcases
while skipping different parts of the testrun deserialization process.
I found that the main performance culprit is the deserialization code in Cursor.
That does a regexp match operation for every one of 60,000 testcase results.
Which neatly explains the slowdown.

For the record: as I understood, you wanted to store individual testcases
(consolidate_pass=False) since you wanted to have a Cursor giving the line
range for every passing testcase in the .log.

So fixing the Cursor deserialization performance is really necessary.

Thankfully, it's possible to make the regexp parsing into an on-demand operation
that occurs when a particular Cursor's line_start/line_end/testlog fields are accessed.
commit 2ed3d13f76c3 should solve the issue, reducing the observed 58sec parsing time to 2s.
https://sourceware.org/git/?p=bunsen.git;a=commitdiff;h=2ed3d13f76c37418cfd4180b149bca0e533ec92f

  reply	other threads:[~2020-09-21 20:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 22:18 Keith Seitz
2020-09-16 23:09 ` Serhei Makarov
2020-09-18 16:16   ` Keith Seitz
2020-09-21 20:08     ` Serhei Makarov [this message]
2020-09-21 20:16       ` Keith Seitz

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=8e645045-04e6-412d-97d2-46a173d2fefa@www.fastmail.com \
    --to=me@serhei.io \
    --cc=bunsen@sourceware.org \
    --cc=keiths@redhat.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).