Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 624526

Summary: sys-apps/portage: optimize doins
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - Ebuild SupportAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: enhancement CC: andig.mail, tsmksubc
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: All   
URL: https://chromium-review.googlesource.com/559225
See Also: https://bugs.gentoo.org/show_bug.cgi?id=607868
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 835380, 637452    

Description Zac Medico gentoo-dev 2017-07-11 06:12:06 UTC
A python rewrite of doins gives a significant performance gain:


https://chromium-review.googlesource.com/559225
Comment 2 Larry the Git Cow gentoo-dev 2017-12-02 21:33:56 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=e8f9d69d760a772aa4bcc695d2ac655a9f89e8d9

commit e8f9d69d760a772aa4bcc695d2ac655a9f89e8d9
Author:     Zac Medico <zmedico@gentoo.org>
AuthorDate: 2017-11-30 20:21:56 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2017-12-02 21:17:41 +0000

    bin/doins.py: optimize with copyfile from portage.util.file_copy
    
    Bug: https://bugs.gentoo.org/624526

 bin/doins.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

https://gitweb.gentoo.org/proj/portage.git/commit/?id=d9522ba661b5ae1e55ad595af2e913db755f184e

commit d9522ba661b5ae1e55ad595af2e913db755f184e
Author:     Hidehiko Abe <hidehiko@chromium.org>
AuthorDate: 2017-06-13 17:28:21 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2017-12-02 21:17:10 +0000

    Rewrite doins in python (bug 624526)
    
    doins is written in bash. However, specifically in case that
    too many files are installed, it is very slow.
    This CL rewrites the script in python for performance.
    
    BUG=chromium:712659
    TEST=time (./setup_board --forace && \
         ./build_package --withdev && \
         ./build_image --noenable_rootfs_verification test)
    ===Before===
    real    21m35.445s
    user    93m40.588s
    sys     21m31.224s
    
    ===After===
    real    17m30.106s
    user    94m1.812s
    sys     20m13.468s
    
    Change-Id: Ib10f623961ba316753d58397cff5e72fbc343339
    Reviewed-on: https://chromium-review.googlesource.com/559225
    X-Chromium-Bug: 712659
    X-Chromium-Bug-url: https://bugs.chromium.org/p/chromium/issues/detail?id=712659
    Reviewed-by: Manuel RĂ¼ger <mrueg@gentoo.org>
    Bug: https://bugs.gentoo.org/624526

 COPYING                             |  29 ++
 bin/doins.py                        | 580 ++++++++++++++++++++++++++++++++++++
 bin/ebuild-helpers/doins            | 156 +++-------
 pym/portage/tests/bin/test_doins.py | 352 ++++++++++++++++++++++
 4 files changed, 1004 insertions(+), 113 deletions(-)}