AutoScrolling Performance
- September 22, 2009
- 1 reply
- 1203 views
If you create a textflow with a single container.
Then onEnterframe append a new div to the textflow.
Then add a selection manager to add scrolling capability.
The performance degrades the further down the container you scroll.
If I remain with the first line of text at the top of the container, even after adding 10000 divs the performance remains stable - adding 100 divs every 4 seconds. If I turn off the onEnterFrame at that point I can still smoothly scroll the text in the container using the mouse wheel.
However, when I turn the onEnterFrame back on and keep appending divs, the performance degrades according to how many lines I have scrolled down in the container.
If you set the vertical scroll policy to VerticalAlign.BOTTOM, then you can see the result of this degradation quite quickly.
Is there an efficient way to append text to a textflow and have the container align its content to the bottom?
I only want to append text to the end of the flow. I imagine it would require some logic like: TextFlow.flowComposer.composeFromPosition() as opposed to TextFlow.flowComposer.composeToPosition() Since I know that only the end of the text flow will be altered.
Since I am only using a single container is there a simpler set up?
Thanks,
Josh
example code attached
