|
From: Ethan A M. <merritt@u.washington.edu> - 2006-02-23 03:48:55
|
On Wednesday 22 February 2006 06:37 am, Bastian Maerkisch wrote:
> When drawing large images (binary and ascii) gnuplot is veeeery
> slow on my (windows) machine. E.g. with an image (RGB) of 1024*256
> pixels it takes about >5.5s to output on any terminal.
>
> Profiling reveals that gnuplot spends >75% of it's time in
> gp_realloc() <-- cp_extend() <-- get_data().
OK, I've done a proper profiling run under linux (Mandriva 2006).
lascaux [141] cat rgbimage.dem
plot '< convert sen.jpeg avs:-' binary filetype=avs with rgbimage
replot
replot
replot
replot
replot
lascaux [142] identify sen.jpeg
sen.jpeg JPEG 1280x899 DirectClass 256kb 0.090u 0:01
Profiling output:
% cumulative self self total
6.81 6.39 6.39 cb2gray (pm3d.c:174 @ 80c666c)
5.53 11.57 5.19 store2d_point (plot2d.c:842 @ 80b8711)
4.66 15.94 4.37 X11_image (x11.trm:1868 @ 80efae3)
3.74 19.45 3.51 cb2gray (pm3d.c:180 @ 80c66ee)
3.50 22.73 3.28 cb2gray (pm3d.c:178 @ 80c66d0)
3.09 25.63 2.90 store2d_point (plot2d.c:841 @ 80b849d)
2.87 28.32 2.69 store2d_point (plot2d.c:843 @ 80b899e)
[snip 200 lines]
0.00 93.81 0.00 6954 0.00 0.00 gp_realloc (alloc.c:295 @ 804bc00)
0.00 93.81 0.00 6930 0.00 0.00 cp_extend (plot2d.c:144 @ 80b587c)
>
> Can anybody confirm this behaviour on non-windows machines?
No.
Under linux the gp_realloc() takes 0 time for all intents and purposes.
Most time spent (19% net) is in routine store2d_point()
Next largest chunk of time (14%) is in cb2gray()
After that no single routine stands out
> Or is this a problem of gp_realloc() on Windows?
No idea where the problem is under Windows.
Separate timing run (no profiling):
lascaux [2389] time ./gnuplot rgbimage.dem
1.854u 0.249s 0:02.70 77.4% 0+0k 0+0io 54pf+0w
So, 6 times through plotting a 1280x899 rgbimage takes less than
2 seconds including the file reading and program startup.
Your reported 5+ seconds for 1 plot of an image 1/3 that size
seems excessive any way you look at it.
--
Ethan A Merritt
Biomolecular Structure Center
University of Washington, Seattle 98195-7742
|