On Tue, Oct 14, 2003 at 04:14:19PM +0200, Alfredo Braunstein wrote:
> If that is the case, then we can happily gain the speed by simplifying, and
> then remove the cache. Doing the other way around will buy us nothing but
> enemies.

But doing it the other way round is much harder, maybe impossible.

If TextCache were gone, I could simply move the ParagraphList from
InsetText and Buffer::Impl to LyXText and rename 'LyXText' to
'NewParagraphList'. Then we could replace the LyXText in the
NewParagraphList with a map<BufferView*, LyXText> and have almost
everything in place for multiple BufferViews.

(Incidentliy, this would mean, that ParIterator would again contain
references to 'NewParagraphLists' - but now the Right Ones)

As it stand right now we cannot do that as there is no 1:1 matching from
the buffer's ParagraphList to a certain LyXText, so I can't do that
first step. And I fail to see alternatives.

> But you need to cache y-positions anyway.

Per paragraph perhaps. This is a factor of 5 or so in a typical text
document.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to