|
From: Daniel J S. <dan...@ie...> - 2006-06-14 21:47:49
|
Ethan Merritt wrote:
> On Wednesday 14 June 2006 12:53 pm, you wrote:
>
>>Oh, it would be nice to speed up the palette assignment. Something
>>just isn't right with those demos that use pm3d; takes forever,
>>computer speaking.
>
>
> [shrug] I doubt that it matters for any real-world case.
> But if you want to figure out where the time is going, I think
> you had best start profiling the executable.
Well, the real issue is the reallocating of the palette unnecessarily. I think we fixed this for the mouse redraw, but there are some loose ends.
The problem is these make_palette()'s scattered throughout whenever there is a plot element that needs the palette, e.g.
can_pm3d = is_plot_with_palette() && !make_palette()
if (make_palette() || !term->set_color) {
All that really should be here is something called "valid_palette()", i.e.,
can_pm3d = is_plot_with_palette() && valid_palette()
if (valid_palette() || !term->set_color) {
I still contend that the only time that make_palette() should be done in the core is when
1) a "set palette" is explicitly commanded
2) whenever a "set term" is done (because the palette could have changed a lot while "connected" with a different terminal)
Now, if a "set term x11" is inherent in initialization then there is no need to explicitly initialize the palette.
When "make_palette()" is done, a variable should be set for which
int valid_palette(void)
{
return palette_set_successfully;
}
can be used.
If a particular terminal needs to keep reissuing the palette (as we've concluded that the PostScript term should do for proper post-usage in viewers) then that is the terminal drivers responsibility.
Dan
--
Dan Sebald
phone: 608 256 7718
email: daniel DOT sebald AT ieee DOT org
URL: http://webpages DOT charter DOT net/dsebald/
|
|
From: Ethan M. <merritt@u.washington.edu> - 2006-06-14 22:10:18
|
On Wednesday 14 June 2006 02:56 pm, Daniel J Sebald wrote: > Ethan Merritt wrote: > > On Wednesday 14 June 2006 12:53 pm, you wrote: > >>Oh, it would be nice to speed up the palette assignment. Something > >>just isn't right with those demos that use pm3d; takes forever, > >>computer speaking. > > > > [shrug] I doubt that it matters for any real-world case. > > Well, the real issue is the reallocating of the palette > unnecessarily. I am not following you. The demo plots that 'take forever' are in fact changing the palette with each plot. That is the point of the demo, right? So these palette initializations *are* necessary. -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |
|
From: Daniel J S. <dan...@ie...> - 2006-06-14 22:43:42
|
Ethan Merritt wrote: > On Wednesday 14 June 2006 02:56 pm, Daniel J Sebald wrote: > >>Ethan Merritt wrote: >> >>>On Wednesday 14 June 2006 12:53 pm, you wrote: >>> >>>>Oh, it would be nice to speed up the palette assignment. Something >>>>just isn't right with those demos that use pm3d; takes forever, >>>>computer speaking. >>> >>>[shrug] I doubt that it matters for any real-world case. >> >>Well, the real issue is the reallocating of the palette >>unnecessarily. > > > I am not following you. The demo plots that 'take forever' are in > fact changing the palette with each plot. That is the point of the > demo, right? So these palette initializations *are* necessary. Half of pm3d.dem, yes. However, there are many plots where the palette is not change from the previous plot. An especially bad example is the last in pm3d.dem. In that demo are 8 separate plots, all of which use the same palette. Hit return on that plot and watch the "allocating colors..." message keep popping up. I added a few lines of fprintf's to show when PaletteMake is called and when the palette tests out to be the same. Here is the result for that particular plot: Plot by pm3d algorithm draws quadrangles filled with color calculated from the z- or color-value of the surrounding 4 corners. The following demo shows different color spots for a plot with very small number of quadrangles (here rectangular pixels). Note that the default option is 'mean'. make palette max_colors = 512 SAME PALETTE make palette max_colors = 512 SAME PALETTE make palette max_colors = 512 SAME PALETTE make palette max_colors = 512 SAME PALETTE make palette max_colors = 512 SAME PALETTE make palette max_colors = 512 SAME PALETTE make palette max_colors = 512 SAME PALETTE Hit return to continuemake palette max_colors = 512 SAME PALETTE |
|
From: Ethan A M. <merritt@u.washington.edu> - 2006-06-15 15:25:39
|
On Thursday 15 June 2006 12:03 am, Daniel J Sebald wrote: > > I'm thinking maybe we should have a scheme in X11 where each > subplot be its own X window having its own colormap. > So, that would be my proposition for this. > Create some kind of gnuplot_x11 pipe command like "layer" that > will put another x11 window on top of the base window for each subplot. I think it would be more useful if you would pitch in and help fix the relatively minor glitches holding up a 4.2 release. Re-designing x11 is way outside the scope of this, and better left to post-release discussion of "where do we go next?". The bottom line seems to be that this bug is not fixable on a 4.2 timeline. I will mark it as "won't fix". -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |