wiki:TEXT_PERFORMANCE_R0

Version 5 (modified by boyan, 15 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=TEXT_PERFORMANCE_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

Text performance is bad. The purpose of this task is to improve it and make Sophie usable with large text (see the Comments section). At the first revision, known bottlenecks should be attacked and fixed and a way to measure performance should be established. At next revisions, profiling should be performed to find other bottlenecks that slow down the text. These should be fixed as well.

Task requirements

  • The following issues that are known to affect text performance should be fixed:
    • Text processors - they should have a faster implementation. Currently their naive implementation processes the whole text after every keystroke, which is very slow.
    • Properties in BaseTextModel - they should be reduced as their constant re-computation causes slowdown.
    • Mark and caret positions - when navigating through the text or typing, mark and caret positions are moved separately, which leads to processing the text twice.
  • Tests should be extended to show text processors performance. At later revisions, they should be extended to serve as profilers.

Task result

Source code

Implementation idea

  • Text processors should not process the whole text but instead only the portion of it that has changed.
  • The processedText property in BaseTextModel is computationally heavy and should be changed if possible.
  • Mark and caret positions can be combined in a single property since they are the same in most cases (except selection).
  • Text performance is best measured by running automatic tests. A set of predefined and fixed text resources should be created and used in the tests. Performance of each individual task should be tested - e.g. importing, typing, deleting, changing styles, chaining, wrapping, etc.

TEXT_MODEL_REDESIGN

How to demo

  • Show the better performance by pasting a large text and editing it.
  • Run the performance tests written and describe the results.
  • (internal) Show and describe the implementation of one of the processors.
  • (internal) Show and describe the improved BaseTextModel.

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

"Large text" is currently defined as the text contained within 100 standard-sized frames, each one on its own page.