|
From: Juhász P. <pet...@gm...> - 2010-10-07 20:07:39
|
Dear gnuplot developers, while doing some work on a large dataset, I've noticed that gnuplot uses what could be construed as an excessive amount of memory if the terminal is set to pdfcairo. (My machine actually ran out of physical memory and began to thrash the swap, that's why I noticed). I've done some simple benchmarking with random data (k*1e5 pairs of random numbers generated by perl, where k went from 1 to 10; then this was plotted by: gnuplot -e 'set term pdf;set out "r.pdf";plot "r.txt" w d'). >From what I can see from the benchmark, the dependence of the memory consumption on the dataset size is completely linear - this is expected and understandable. What is not expected and hardly understandable is the ratio: it needs about 872 bytes per point. The pdfcairo terminal also takes a long time: about 27.9 s to plot 1 million points. (The time dependence is also linear.) For comparison, the same data for the postscript terminal: little more than 60 bytes per point (which is just what the plot->points array needs) and just above one second of execution time for the same 1 million points. Now I haven't delved into the innards of the pdfcairo terminal driver, and if you tell me that this is normal and expected, I'll believe you. But I can't imagine why it needs over 800 bytes to store a single point. A not entirely unrelated question: how do I compile gnuplot with profiling? I tried giving CFLAGS="-g -pg" to the configure script, but the gmon.out file was not there after running gnuplot. Péter Juhász |