Deleting from a textFlow with out a full recomposition
I have a textflow in which new paragraphs are added to the bottom, sometimes at great speed.
To keep the textFlow from becoming infinitely large I delete paragraphs from the top.
The visible lines of the TF in the container are at the bottom of the textFlow - where the new paragraphs are being added.
Each time a paragraphElement is deleted from the top - the textFlow recomposes entirely, which if I have set the maximum length to 1000 paragraphs for example - can take a long time.
I delete the top pargrapElement using textFlow.removeChildAt().
Because a paragraph implies a line break, there is actuall no need to recompose the entire textFlow - just the y position of the textFlowLines would need to be adjusted - because the width has not changed.
Sorry for the long exposition - here is the question:
Is there a way to remove a paragraphElement from the top of a textFlow - without forcing a recomposition of the entire textFlow up to the point which is visible in a container?
I imagine there could be a function like removeBlockElement() - it would only allow the deletion of ParagraphElements and DivElements - not SpanElements or InlineGraphicElements - because thoose would need to force a recomposition - given that they may not take up the full width or imply a lineBreak.
If I wanted to add this functionality - could someone suggest how I might implement it?
Thanks,
Josh
