MantisBT - Scoring Application Prototype
View Issue Details
0000005Scoring Application Prototype[All Projects] Generalpublic2014-05-14 00:352014-05-27 18:39
ptrue 
ptrue 
normalfeaturealways
resolvedfixed 
 
Sprint #5Sprint #5 
0000005: Reduce amount of recalculation
recalculate() should be reduced in two directions:
1) only start from caret position (not from beginning)
2) only recalculate next system if current system bottom position or right-most vertical is changed and only recalculate next page if amount of systems on this page has changed.
No tags attached.
parent of 0000018resolved  Introduce getMinimumHeight() and getPreferredHeight() for StaffSystemFragment 
parent of 0000020resolved ptrue Vertical scaling threshold for the ending pages 
Issue History
2014-05-14 00:35ptrueNew Issue
2014-05-14 00:35ptrueStatusnew => assigned
2014-05-14 00:35ptrueAssigned To => ptrue
2014-05-14 02:02administratorTarget Version => Sprint 0000004
2014-05-14 02:04administratorStatusassigned => new
2014-05-17 14:05ptrueStatusnew => assigned
2014-05-19 02:46ptrueNote Added: 0000009
2014-05-20 14:34ptrueRelationship addedparent of 0000018
2014-05-20 14:35ptrueNote Edited: 0000009bug_revision_view_page.php?bugnote_id=9#r6
2014-05-24 12:13ptrueTarget VersionSprint 0000004 => Sprint 0000005
2014-05-26 16:21ptrueStatusassigned => resolved
2014-05-26 16:21ptrueResolutionopen => fixed
2014-05-27 18:32administratorRelationship addedparent of 0000020
2014-05-27 18:39administratorFixed in Version => Sprint 0000005

Notes
(0000009)
ptrue   
2014-05-19 02:46   
(edited on: 2014-05-20 14:35)
Problem:
When page is being recalculated() we always recalculate one system of the next page in order to check if it can fit to the current page. So if it is decided not to continue to the next page then the first system of the next page will have wrong values.

Possible solutions:
1) Not to check that system. This is only possible if autoAlignment is turned off.
2) Check some precondition if it make a sense to check that system. Like if we have more material than previously then that system doesn't fit to this page for sure.
3) Save previous state of the system and then restore it if it stays on the next page.
4) Keep all the calculated values separate from the objects so that we just create a new "calculation object" and don't spoil anything by calculations.
5) Don't do the system fragment recaculation until needed. For checking use getMinimumHeight() and getPreferredHeight().