Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 781860 - webapp.eclass causing huge delay in src_install
Summary: webapp.eclass causing huge delay in src_install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Web Application Packages Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-09 18:39 UTC by Thomas Deutschmann (RETIRED)
Modified: 2023-10-18 12:11 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch misc-functions.sh to output begin and end time for each install-qa-check.d script (bin-misc-functions.sh-show-begin-and-end-time-for-QA.patch,925 bytes, patch)
2021-04-09 18:56 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-09 18:39:46 UTC
> # genlop -t nextcloud
>  * www-apps/nextcloud
> 
>      Fri Apr  9 20:18:33 2021 >>> www-apps/nextcloud-21.0.0
>        merge time: 11 minutes and 59 seconds.

This packages needs no compilation, nothing. Unpack & move to $D. But it will hang ~11min in src_install due to some QA checks (htop shows "find" command).

Can we improve that? ~12min for nothing on Crucial CT525MX3 SSD is a little bit insane. ;)
Comment 1 Zac Medico gentoo-dev 2021-04-09 18:56:25 UTC
Created attachment 698856 [details, diff]
Patch misc-functions.sh to output begin and end time for each install-qa-check.d script

Please use something like this to collect individual times for each install-qa-check.d script.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2021-04-09 19:50:53 UTC
I was wrong. QA checks are only running for ~5 seconds -- it is the webapp eclass :/

eclass-debug.log is very large... full of calls to

webapp_checkfileexists
webapp_strip_cwd
webapp_strip_d
Comment 3 Zac Medico gentoo-dev 2021-04-09 20:59:55 UTC
Hmm, I wonder if that could be optimized...
Comment 4 Larry the Git Cow gentoo-dev 2023-10-18 12:11:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83b08b7d9434e5829ddaee08562790a2d939fa99

commit 83b08b7d9434e5829ddaee08562790a2d939fa99
Author:     Florian Schmaus <flow@gentoo.org>
AuthorDate: 2023-10-17 12:38:00 +0000
Commit:     Florian Schmaus <flow@gentoo.org>
CommitDate: 2023-10-18 12:10:37 +0000

    webapp.eclass: optimize webapp_serverowned() and inline webapp_strip_*()
    
    Some ebuilds invoke webapp_serverowned() with -R, causing the eclass to
    iterate over a large set of files. Within the iteration's body the
    eclass forks multiple times to invoke the webapp_strip, which is very
    inefficient and causes a huge slowdown.
    
    This optimizes webapp_serverowned() by replacing the iteration and call
    to the "strip" functions with a single equivalent invocation of find
    to iterates all the files.
    
    Furthermore, all remaining invocations of webapp_strip_*() are inlined.
    
    Closes: https://bugs.gentoo.org/781860
    Signed-off-by: Florian Schmaus <flow@gentoo.org>

 eclass/webapp.eclass | 40 ++++++++++++++++------------------------
 1 file changed, 16 insertions(+), 24 deletions(-)