|
From: Ethan A M. <merritt@u.washington.edu> - 2006-11-19 17:50:59
|
On Sunday 19 November 2006 05:47 am, Petr Mikulik wrote: > >> This extends the capabilities of svg, xfig, and maybe other terminals. > >> > >> The specialized code for image handling could be removed from gd.trm, for > >> instance. Also x11. Is this worth doing? > > Do you really mean to remove the term->image() routine??? Definitely no, the > processing is several orders of magnitude slower ... try to draw a 1024x1024 > image with pm3d and with image. Terminal-specific term->image() is the > proper way. It may seem counter-intuitive, but in fact the RGB polygon processing is just as fast as the term->image() processing, at least for gd.trm. Here is a timed benchmark run using a 800x600 image for the test script set term png truecolor size 1024,768 set output 'junk.png' plot 'bench.avs' binary filetype=avs with rgbimage replot [... 10 plots total] replot time ./gnuplot bench.gnu (average of 5 runs) 16.785u 0.509s 0:17.31 99.9% 0+0k 0+0io 0pf+0w same thing except "with rgbimage generic" 16.672u 0.572s 0:17.18 99.4% 0+0k 0+0io 0pf+0w The generic code is significantly slower (4-5X) for x11, but I think that is a matter of the transfer time through the pipe for a description that is less compact (30MB vs 2.9 MB). This difference could be reduced by switching to a binary protocol for transmitting RGB color + polygon down the pipe. x11 with rgbimage 6.331u 0.675s 0:07.05 99.2% 0+0k 0+0io 0pf+0w x11 with rgbimage generic 28.418u 17.907s 6:37.59 11.6% 0+0k 0+0io 0pf+0w -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |