nixpkgs/pkgs/tools
Andreas Herrmann 79e145a970 gnuplot: Improve startup performance
Before executing the gnuplot executable the environment variable `GDFONTPATH`
is populated with a list of font directories, which is obtained from `fc-list`.
In that process we iterated over each line and called `dirname` on it, which
introduces a performance hit for loading and executing the external executable
`dirname` every time.

The new version avoids the loop.

The author of this patch measured a 42 fold performance improvement:

old version:

    $ time ./gnuplot_old/bin/gnuplot -e ''
    real    0m3.828s
    user    0m0.392s
    sys     0m0.465s

new version:

    $ time ./gnuplot_new2/bin/gnuplot -e ''
    real    0m0.091s
    user    0m0.112s
    sys     0m0.014s

The correctness of the value of `GDFONTPATH` was confirmed with the following
command and comparing its output between versions:

    $ gnuplot -e 'print system("echo $GDFONTPATH")'
2016-01-11 15:37:07 +01:00
..
admin simp_le: 20151205 -> 20151207 2015-12-12 16:06:51 +01:00
archivers unrar: fix #12084: wrong license 2016-01-02 12:30:28 +01:00
audio beets: Add the external beets-alternatives plugin 2015-12-18 05:58:27 +01:00
backup borgbackup: 0.27.0 -> 0.29.0 2016-01-08 01:36:32 +01:00
bluetooth Use libpulseaudio instead of pulseaudio 2015-05-29 14:32:56 -07:00
bootloaders/refind refind: 0.8.4 -> 0.9.2 2015-11-01 09:37:00 -02:00
cd-dvd mkcue: fetch source from debian 2016-01-03 17:27:24 +01:00
compression zopfli: build & install zopflipng, shared libraries, READMEs 2016-01-03 00:24:28 +01:00
filesystems f2fs-tools: add pkgconfig 2016-01-05 19:57:48 +01:00
graphics gnuplot: Improve startup performance 2016-01-11 15:37:07 +01:00
inputmethods fcitx-configtool: add icon theme, fixes #11895 2016-01-03 20:32:59 +01:00
misc ltunify: init at 20140331 2016-01-11 05:21:59 +03:00
networking easyrsa: 2.2.0 -> 3.0.0 2016-01-10 07:28:55 +03:00
package-management nixUnstable: 1.11pre4334_7431932 -> 1.11pre4345_b8258a4 2015-12-29 17:54:58 +01:00
security pamtester: init at 0.1.2 2016-01-10 06:03:21 +03:00
system pciutils: minor update 3.4.0 -> 3.4.1 2016-01-07 00:17:59 +01:00
text Merge pull request #12267 from zimbatm/dos2unix-7.3.2 2016-01-09 23:52:39 +03:00
typesetting latex2html: remove dead package 2016-01-11 01:41:54 +01:00
video vncrec: reimplement using mkDerivation 2015-11-24 14:45:15 +01:00
virtualization buildPythonPackage: fix standalone applications using it 2015-11-21 21:44:12 +01:00
X11 setroot: init at 1.4.4 2016-01-06 15:35:09 -05:00