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

Bug 524706

Summary: doins -r is slow
Product: Portage Development Reporter: Ortwin Glueck <odi>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Ortwin Glueck 2014-10-07 15:56:14 UTC
It's slow here:

>>> Emerging (1 of 1) dev-java/java-sdk-docs-1.7.0.67
 * jdk-7u67-apidocs.zip SHA256 SHA512 WHIRLPOOL size ;-) ...                                      [ ok ]
>>> Unpacking source...
>>> Unpacking jdk-7u67-apidocs.zip to /var/tmp/portage/dev-java/java-sdk-docs-1.7.0.67/work
>>> Source unpacked in /var/tmp/portage/dev-java/java-sdk-docs-1.7.0.67/work
>>> Preparing source in /var/tmp/portage/dev-java/java-sdk-docs-1.7.0.67/work/docs ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-java/java-sdk-docs-1.7.0.67/work/docs ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-java/java-sdk-docs-1.7.0.67/work/docs ...
>>> Source compiled.
>>> Test phase [not enabled]: dev-java/java-sdk-docs-1.7.0.67

>>> Install java-sdk-docs-1.7.0.67 into /var/tmp/portage/dev-java/java-sdk-docs-1.7.0.67/image/ category dev-java


ps shows that emerge is doing "doins -r" which is forking off a python script for each file like so:

/usr/bin/python2.7 /usr/lib64/portage/bin/install.py -m0644 jdk/api/javac/tree/com/sun/source/tree/Scope.html /var/tmp/portage/dev-java/java-sdk-docs-1.7.0.67/image//usr/share/doc/java-sdk-docs-1.7.0.67/html/jdk/api/javac/tree/com/sun/source/tree

which is a horribly inefficient thing to do for 13958 files. Like this it manages to install files at a rate of about 10 files per second!

Reproducible: Always
Comment 1 Ortwin Glueck 2014-10-07 15:58:01 UTC
NB: this is quite a "normal" system, nothing slow. HP laptop with an ext4 filesystem.
Comment 2 Zac Medico gentoo-dev 2014-10-07 19:34:56 UTC
You need to install sys-apps/install-xattr (see bug 465000).

*** This bug has been marked as a duplicate of bug 482290 ***