> > > Having taken out the database stuff, there seems to be no single obvious
> > > bottle neck.
> > What is the AGI_SLAB stuff doing? That accounts for a 1/3 of the overhead.
> I find that very hard to believe - all AGI_SLAB does is to store a
> label with an AGI picture. It's called once for every spectrum. When
> I profiled clinplot using gprof it said that agi_slab was using 0.5%
> of the time. Profilers!!!!!
> > If we used switchMaps could we restrict all AGI database handling to a
> > single event after the spectra have been drawn?
> Yes, but it would take quite a bit of re-structuring. The problem is
> that re-using the existing linplot code results in every spectrum being
> created as a separate picture, with all the associated overheads. But
> even switching off all writes to the database only seems to save 25%.
We knew that CLINPLOT was going to be slow storing every plot in the
database so that CURSOR could read off the three-dimensional
co-ordinates. That's where the SwitchMap concept was born. It's
inevitable now we have this possibility that some redesign is necessary.
Not storing to AGI strikes me as not an option. Writing to AGI once
will save up to 25% (and a much smaller AGI file to boot).
Can the profilers also give a breakdown line-by-line like Vaxset PCA
offered? Most of the LINPLOTic code arises before the loop for each
picture. It would be good to know how much goes on the long preamble,
and what proportion is inside the loop for each line plot.
Another thought, if we could determine the resolution (come back GKS all
is forgiven), we could just plot close to the visible number of elements
by averaging or picking before plotting. This was something I added to
DISPLAY many years ago.
25% in dat_get0c is hard to believe. OTOH writing HDS structures is
expensive, and that's once aspect where SwitchMaps ought to help.
> I'll try some experiments with re-structuring the code to avoid re-use
> of linplot code...
So you're saying David that you want to re-structure, but only a small
re-structure? Now you've solved the impossible, shouldn't we recode
chunks of CLINPLOT as if we had SwitchMaps from the outset rather than
reduce functionality?
Malcolm
|