stable

Clone or download

Read-only

Prepare changeset values before iterating on them

As we already compute "previous changeset", leverage on it to avoid having to query again and again the same, already computed, values. On the reference artifact it decrease: * the wall time by 41% (from 7.11s to 4.22s) * the memory by 6% * the number of SQL queries by 80% (from 6337 to 709) The number of SQL queries is ~ the same on an artifact with 10 changesets and the big one with 274 changesets. While testing this contribution, please verify the previous values are still consistent for each type of fields (e.g. there was issues with date fields). Part of request #10069 Tracker comments don't scale up Change-Id: Ie253c1c27d10cbdcc6326a619b9118696c9bde53

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact.class.php +5 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset.class.php +5 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetFactory.class.php +59 −17 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetFactoryBuilder.class.php +6 −3 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetValue_Date.class.php +2 −2 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/dao/Tracker_Artifact_Changeset_ValueDao.class.php +19 −7 Go to diff View file
M plugins/tracker/tests/Tracker_Artifact_ChangesetValue_DateTest.php +66 −19 Go to diff View file