nixpkgs/pkgs
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
..
applications Merge pull request #12317 from sleep/fix/ranger-add-dependency-file 2016-01-11 11:25:41 +01:00
build-support substituteAllFiles: support postInstall 2016-01-10 06:03:26 +03:00
data geolite-legacy 2015-11-23 -> 2016-01-06 2016-01-06 11:59:54 +01:00
desktops gnome-terminal: enable GNOME Shell search provider 2016-01-10 22:27:24 +01:00
development systemtap: remove dead package 2016-01-11 01:41:54 +01:00
games lgogdownloader: 2.24 -> 2.26 2016-01-10 06:01:39 +03:00
misc albatross: 1.7.3 -> 1.7.4 2016-01-10 20:10:50 +01:00
os-specific Increasing mmc possible partitions from 8 to 32. 2016-01-11 09:27:58 +01:00
servers xorgVideoUnichrome: remove dead package 2016-01-11 00:16:01 +01:00
shells fish: fix merge conflict 2016-01-05 23:32:29 +01:00
stdenv stdenv-darwin: allow easier testing of bootstrap tools 2016-01-03 21:47:09 -05:00
test
tools gnuplot: Improve startup performance 2016-01-11 15:37:07 +01:00
top-level xkcdpass: init at 1.4.2 2016-01-11 09:37:12 +02:00