While trying to isolate #1018 I've found out some
performance problem related
to breaking into lines huge text runs. When
fb_LineBreaker::breakParagraph(
fl_BlockLayout*) tries to process a very long text
run, abi looks as if it
have hanged. Lack of visual feedback doesn't help
either.
Although I've to study the case a bit further and I've
yet to come with a non
bogus document ( I've discovered it because the rtf
importer is being confused
by some documents ) which shows the behaviour ( I'm
working on producing a non bogus one ), I'm almost
sure the problem exist and can be
fixed.
I've been thinking about it, and have some ideas:
1) We can rule out long text runs at all, breaking
them into several ones
( don't know enough about abi's backend yet to be sure
whether this makes
sense or not ).
2) Cache some data in the text run to avoid
recomputing thousand of times
TextRun::getWidthInLayoutUnits() ( that was happend in
the case I saw,
though the TextRun was being breaked each time, so a
quick hack wouldn't
apply ).
3) Modify
fb_LineBreaker::breakParagraph(fl_BlockLayout*) to
re-use some
calculated results whenever a TextRun is broken in
two, to speed up the
process.
Diego
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/