Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v2 0/3] ./scripts/igt_doc.py: speedup check logic
Date: Wed, 12 Apr 2023 14:50:30 +0200	[thread overview]
Message-ID: <20230412125033.120215-1-mauro.chehab@linux.intel.com> (raw)

From: Mauro Carvalho Chehab <mchehab@kernel.org>

The logic which checks for missing/obsolete documentation is too
slow. Currently, on my notebook it takes 12 seconds:

	$ time ./scripts/igt_doc.py --check --config tests/xe/xe_*json

	real	0m12.085s
	user	0m10.468s
	sys	0m1.457s

Implent it on a different way, in order to speedup the build process.

After the change, it now takes less than 500ms:

	$ time ./scripts/igt_doc.py --check --config tests/xe/xe_*json

	real	0m0.460s
	user	0m0.357s
	sys	0m0.102s

It should be noticed that it is possible to speed it up even
further by running:

	 build/tests/* --list-subtests

tasks in parallel. I did some tests: the improvements weren't so
relevant on my notebook with 8 CPUs, and, on my tests with python 3.11
it seemed a little too fragile when using multithreading, as it was not
hard to mess with it, not having threads or subprocess forks not
happening, and without triggering an error.

As the benefit of such optimization was marginal, let's avoid the
additional complexity of multithreading.

---

v2:
  - remove a now uneeded loop

Mauro Carvalho Chehab (3):
  scripts/igt_doc.py: cleanup some pylint warnings
  scripts/igt_doc.py: don't depend on igt_runner anymore
  scripts/test_list.py: use a compiled regex for check

Mauro Carvalho Chehab (3):
  scripts/igt_doc.py: cleanup some pylint warnings
  scripts/igt_doc.py: don't depend on igt_runner anymore
  scripts/test_list.py: use a compiled regex for check

 docs/testplan/meson.build |  7 ++--
 scripts/igt_doc.py        | 11 +++---
 scripts/test_list.py      | 73 ++++++++++++++++++++++++++-------------
 3 files changed, 55 insertions(+), 36 deletions(-)

-- 
2.39.2

             reply	other threads:[~2023-04-12 12:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 12:50 Mauro Carvalho Chehab [this message]
2023-04-12 12:50 ` [igt-dev] [PATCH i-g-t v2 1/3] scripts/igt_doc.py: cleanup some pylint warnings Mauro Carvalho Chehab
2023-04-12 12:50 ` [igt-dev] [PATCH i-g-t v2 2/3] scripts/igt_doc.py: don't depend on igt_runner anymore Mauro Carvalho Chehab
2023-04-12 12:50 ` [igt-dev] [PATCH i-g-t v2 3/3] scripts/test_list.py: use a compiled regex for check Mauro Carvalho Chehab
2023-04-12 14:06 ` [igt-dev] ✗ Fi.CI.BAT: failure for ./scripts/igt_doc.py: speedup check logic (rev2) Patchwork

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=20230412125033.120215-1-mauro.chehab@linux.intel.com \
    --to=mauro.chehab@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.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