1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 06:31:02 +00:00
nixpkgs/pkgs/tools/graphics
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
..
argyllcms
asymptote
barcode barcode: reimplement using mkDerivation 2015-11-24 14:45:15 +01:00
briss
cfdg cfdg: reimplement using mkDerivation 2015-11-24 14:45:15 +01:00
cuneiform
dcraw dcraw: update from 9.22 to 9.26.0 2015-10-25 19:06:58 +01:00
diagrams-builder
ditaa
dmtx-utils
editres
enblend-enfuse Revert "Revert "Merge pull request #9543 from NixOS/staging.post-15.06"" 2015-11-14 12:32:51 -08:00
eplot
exif
exiftags
fgallery
ggobi
gifsicle gifsicle: 1.87 -> 1.88 2015-11-15 11:50:20 +01:00
glmark2
glxinfo
gmic
gnuplot gnuplot: Improve startup performance 2016-01-11 15:37:07 +01:00
graphviz link graphviz with libc++ instead of nothing on darwin 2015-10-28 16:09:51 -07:00
icoutils
imgur-screenshot imgur-screenshot: init at 1.5.4 2015-11-06 23:48:32 +03:00
imgurbash
jbig2enc
jhead jhead: add libjpeg as dependency 2016-01-06 20:38:20 +01:00
kst kst: Qt 5 infrastructure update 2015-12-20 07:56:50 -06:00
leela leela: init at 12.fe7a35a 2015-10-16 21:59:49 +11:00
logstalgia logstalgia: 1.0.6 -> 1.0.7 2015-10-26 14:45:13 +01:00
lprof
maim
mscgen
netpbm
nifskope
nip2
optipng
panomatic
pdf2svg pdf2svg: add autoreconf hook (close #11888) 2015-12-23 07:36:25 +01:00
pdfread pdfread: use pillow instead of pil 2015-12-08 15:15:40 +01:00
pfstools
pgf
ploticus
plotutils
pngcheck
pngcrush
pngnq
pngout
pngquant
pngtoico
povray
pstoedit
qrcode
qrencode
quirc
scrot
sng sng: init at 1.0.6 2015-10-25 16:17:44 +02:00
transfig
unpaper
vips vips: 8.0.2 -> 8.1.1 2015-12-15 03:46:35 +09:00
welkin
wkhtmltopdf wkhtmltopdf: add myself as maintainer 2015-10-27 17:20:26 -07:00
zbar Remove unneeded 'with's from meta.platforms 2015-11-25 23:06:09 +01:00
zxing