stable

Clone or download

Read-only

Improve insertion of changeset value

When a new field is added to a tracker, the last changeset of each tracker is retroactively updated to insert a "none" changeset value. The query that was doing the insertion in tracker_changeset_value table was looking for the last changeset id of each artifact (of the platform) before filtering out artifacts in the selected tracker. This commit leverage tracker_artifact "last_changeset_id" field that already holds the value we were recomputing at a huge cost. On our data sample with 350'000 artifacts the query went from 11s to some ms. To reviewer, please take time to carefuly review the original code to ensure I didn't mis-understand the intend of the code in first place (and, of course, that the new version does the same thing...). Part of request #22197 Creating a new field in a tracker can be slow Change-Id: Ibc1935531048d1eecb120c41255847ef5a5878d9

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/dao/Tracker_Artifact_Changeset_ValueDao.class.php +12 −20 Go to diff View file