Ticket #2171 (closed tweak: obsolete)

Opened 15 years ago

Last modified 13 years ago

nfr-autochain-performance - Sophie autochaining is very slow when working with large texts.

Reported by: deyan Owned by: mira
Priority: critical Milestone: X3
Component: uncategorized Version: 2.0
Keywords: Cc:
Category: unknown Effort: 2
Importance: 98 Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: mira Design_owners: mira
Imp._owners: mira Test_owners:
Analysis_reviewers: mira Changelog:
Design_reviewers: meddle Imp._reviewers: meddle, deyan
Test_reviewers: Analysis_score: 3.5
Design_score: 3.5 Imp._score: 3.5
Test_score: 0

Description (last modified by todor) (diff)

it's taking me at least 5 seconds to turn pages in a small book (500x300) with auto-chained text on the pages.

  • Sophie autochain is too slow for big text, improve the performance of the autochaining.

Attachments

performance.patch (40.1 KB) - added by mira 15 years ago.
change-set

Change History

comment:1 Changed 15 years ago by deyan

  • Importance changed from 96 to 98

Batch update from file report_1.csv

comment:2 Changed 15 years ago by deyan

  • Priority changed from major to critical

Batch update from file 0911261.csv

comment:3 Changed 15 years ago by todor

  • Category set to unknown
  • Description modified (diff)
  • Analysis_score set to 0
  • Test_score set to 0
  • Design_score set to 0
  • Imp._score set to 0

comment:4 Changed 15 years ago by todor

  • Summary changed from nfr-autochain-performance to nfr-autochain-performance - Sophie autochaining is very slow when working with large texts.

comment:5 Changed 15 years ago by mira

  • Owner set to mira
  • Status changed from new to s1a_analysis_started

comment:6 Changed 15 years ago by mira

  • Status changed from s1a_analysis_started to s1b_analysis_finished
  • Analysis_owners set to mira

comment:7 Changed 15 years ago by mira

  • Status changed from s1b_analysis_finished to s1c_analysis_ok

comment:8 Changed 15 years ago by mira

  • Status changed from s1c_analysis_ok to s2a_design_started

comment:9 Changed 15 years ago by mira

  • Design_owners set to mira
  • Status changed from s2a_design_started to s2b_design_finished

There are two basic problems:

  1. There is a cyclic dependancy between the view and the model.
  2. While mass changes like creating many pages, frames and so on all properties of those views are updated.

The first problem could be solved if the TextFrameH does not take a BookView as argument and does not need for views to be constructed to get all frames in a chain.

The second is a bit more complicated - we would need a single property that keeps all
chains in a book and does not update while mass updating - just returns its old value until chaining stops.

  • Make an immutable class ChainInfo that simply wraps the ImmMap<ResourceRef, ImmList<TailTextH>>. Its should proivde a method for getting a chain based on the ResourceRef of its head-frame. It should also provide hashCode and equals methods so that when there are no changes in the chains, the view properties do not recompute.
  • Make a class called ChainMaster. It would keep the chains for a single book. It would have final field keeping BookH for this book. It should also have an AutoProperty chainInfo() that maintains an acurate list of all chains in this book.
  • the most significant delay in chaining methods is the updating of the view properties when making series of changes over the model. So there should be a property that keeps a boolean value indicating that those props should not be recomputed. While it is true the chainInfo() property will just return its last value.

Set this property to true always when there are a lot of changes expected and be shure to set it back to false after.

comment:10 Changed 15 years ago by mira

  • Status changed from s2b_design_finished to s2c_design_ok

comment:11 Changed 15 years ago by mira

  • Status changed from s2c_design_ok to s3a_implementation_started

comment:12 Changed 15 years ago by mira

The implementation is made according to the design.
There was added one more thing for general perfomance - the equals and hashCode methods are made to work with parts instead of ids. In order to do this I made sure that there were no "" elements in the parts list.

There is a changeset attached to this ticket.

Changed 15 years ago by mira

change-set

comment:13 Changed 15 years ago by mira

  • Status changed from s3a_implementation_started to s3b_implementation_finished

comment:14 Changed 15 years ago by meddle

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._owners set to mira
  • Analysis_reviewers set to mira
  • Analysis_score changed from 0 to 3.5
  • Imp._reviewers set to meddle, deyan
  • Design_score changed from 0 to 3.5
  • Design_reviewers set to meddle
  • Imp._score changed from 0 to 3.5

So, you are very absent minded and leave so things like:

  • Bad spacing
  • System.outs
  • Comments that have no meaning in the trunk...

Be more careful in the future:

  • Changed the ChainMaster to ChainManager, you know why :)
  • I strongly recommend you investigate the two or more chaining bad performance... Speak with deyan or todor to write you a ticket, if they do not want kick them in the teeth!!! :)

You didn't score the analysis... bad bad bad...
Fill your fields!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

3.5p

comment:15 Changed 13 years ago by meddle

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to obsolete

Closing all the tickets before M Y1

Note: See TracTickets for help on using tickets.