Abdelrazak Younes a écrit :
On Mon, Feb 06, 2006 at 09:59:42AM +0100, Jean-Marc Lasgouttes wrote:
This is what I was about to suggest: currently, every time a paragraph
is created/killed, the whole document after it is duplicated. For
images, this means a lot of work. In particular, I think a pixmap is
created in the X server, which means a lot of data to transfer.
Hello Jean-Marc, maybe this is the bottleneck I am looking for. With my
patch, undo/redo paragraph insertion is instantaneous and I can see that
ParagraphList::insert and/or erase are called.
Could you explain me why the whole document after a deletion has to be
created? Could you point me to the code that do that?
Thanks in advance.
In french we say "On est jamais si bien servi que par soi-meme." So I
investigated a bit more and I think the bottleneck is in
"paragraph_pimpl.C":
void Paragraph::Pimpl::eraseIntern(pos_type pos)
I think this is because the member fontlist is a std::vector<FontTable>
and eraseIntern seems to be doing a lot of deletion. Would it make sense
to apply the same strategy as ParagraphList? It should be as easy as
"templatify" my version of the ParagraphList and reuse that for for
fontlist... What do you think?
Abdel.