Version 2 (modified by kyli, 15 years ago) (diff) |
---|
Analysis
Overview
The current text layout mechanism re-flows the text every time the content or the areas are changed. This is quite ineffective for large chains, so it causes performance problems.
Task requirements
- Make the layout as lazy as possible:
- When something is changed, all the area layouts before the modified one should be reused (it should currently be that way, just ensure and test that everything is working)
- When something is changed, all the area layouts after the last visible one could wait.
- Laziness should not break the auto-chaining.
- Provide basics for segment layout caching. Caching should not necessarily work after this task is completed, since the text hash function may not be correct. However, make sure that if the text is OK, the layout segments will be cached.
Task result
Better text layout performance.
Implementation idea
- Introduce hot layout status and define it. Possible statuses may be valid, invalid, partially valid.
- Introduce area layout status - valid or invalid.
- Create a background thread, which validates the layout area by area when the user is not working.
Related
None.
How to demo
Measure the layout performance in different scenarios with and without lazy approach (this could auto-tested).
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)