[Rpm-maint] [rpm-software-management/rpm] find-debuginfo.sh: speed up %dir generation (#975)

Panu Matilainen notifications at github.com
Fri Dec 13 10:09:02 UTC 2019


Submitting on behalf of Denys Vlasenko:

For kernel build, "${LISTFILE}.dirs.sed" is debugfiles.list.dirs.sed
and it contains 1782 lines of sed script.
It is applied to two files, both are about 4450 lines long.

This is slow (~30 seconds) because of ~16 million regex matches
performed by sed.

But we don't need or want regex match here
(and it's buggy, since dots in pattern match will be treated
as "any character", which is wrong here. For example,
      /usr/lib/debug/lib/modules/5 at 4@0-0 at rc7@0 at fc31@test at x86_64/vdso/
would match
      /usr/lib/debug/lib/modules/5.4.0-0.rc7.0.fc31.test.x86_64/vdso/
pattern, but it should not).

This change performs matching using shell string comparison ops.
For kernel build, this change results in run time of about one second.

Signed-off-by: Denys Vlasenko <dvlasenk at redhat.com>
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/975

-- Commit Summary --

  * find-debuginfo.sh: speed up %dir generation

-- File Changes --

    M scripts/find-debuginfo.sh (20)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/975.patch
https://github.com/rpm-software-management/rpm/pull/975.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/975
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191213/95ec41d5/attachment.html>


More information about the Rpm-maint mailing list