I think the change of container from list to vector for ParagraphList
is putting us in a bad situation. Remember the weird bug I had to
solve with DEPM a few weeks ago: everytime you insert a paragraph in a
document, all subsequent paragraphs are cloned and deleted because
they have to move.

But the situation seems to be worse. Launch LyX and load
Help>Introduction. See how the first paragraph has id 262. This
probably means that the whole document has been
allocated/deallocated/reallocated just be loading it. Strange.

Now, in Document>Settings, change the textclass to article. This gives
3 errors, since the chapter headings have been changed to Standard.
But the error list does not work: it searches for id 994 (which was
266 before switching class: document allocated three more time), but
994 does not exist anymore, it is 1258 already :)

My problem is that I do not know where and why this happens... But
this cannot be good for performance or memory fragmentation anyway.

So, would it still be time to go back to std::list or something else?
Can we have a vector of share_ptr<Paragraph> or some other wicked
construct?

Lars?

JMarc

Reply via email to