|
From: Daniel J S. <dan...@ie...> - 2004-09-28 10:40:19
|
Daniel J Sebald wrote:
> I've tried some images in Octave, increasing the palette 2^6, 2^7,
> etc. Around 2^14 gnuplot_x11 *really* slows down. I'm talking on the
> scale of minutes.
>
> Could it be that:
>
> if (XAllocColor(dpy, new_cmap->colormap, &xcolor)) {
>
> is a slow routine and allocating these colors one at a time is very
> slow? Is there some way to assign colors all at once?
Actually, that may not be the problem. I notice that choosing the max
colors in gnuplot to be 32768 doesn't take too long. So the difference
may be that in Octave the palette is custom and the issue is all the
ASCII encoded palette information going across the gnuplot/gnuplot_x11
pipe and then read using scanf. (I'm not sure.) This could be a little
annoying when working in Octave, although I don't think images often
have a resolution much beyond 12 bits.
However, I would say that if it does turn out to be a problem, once the
colormap is put in X, the window refreshes just fine... so I'm wondering
if *not* always sending the palette information to gnuplot_x11 would be
a good thing to do. I don't see a problem with sending the palette only
when it should be changed. I'll put a toe in that camp for now.
Dan
|