stable

Clone or download

Read-only

Memoize calls made to TrackerPrivateCommentUGroupEnabledDao::isTrackerEnabledPrivateComment

In a tracker where the private comments are disabled, instead of executing 3 SQL queries per followup comments we now execute at most 2 SQL queries. This contribution greatly reduces the performance cost in the default case, however there is still room for improvement that should be taken into account for the rest of story #19275: * Tracker_Artifact_Changeset_Comment::fetchFollowUp should use the same instance of TrackerPrivateCommentUGroupPermissionRetriever than Tracker_Artifact_ChangesetFactory::setCommentsFromCache * it is also likely there is some improvements that could be done to avoid retrieving the user groups per comments and retrieving all at once Closes request #20949: Handling the private comments cost 3 SQL queries per followup comments when displaying an artifact Change-Id: I885479c41a794162a9baacb1d7dfda0dcf2e8ef5

Modified Files

Name
M plugins/frs/include/FRS/REST/v1/ReleaseRepresentation.php +3 −1 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +3 −1 Go to diff View file
M plugins/tracker/include/REST/v1/ReportsResource.class.php +3 −1 Go to diff View file
M plugins/tracker/include/REST/v1/TrackersResource.class.php +3 −1 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/CachingTrackerPrivateCommentInformationRetriever.php +55 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionChecker.php +5 −5 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/RetrieveTrackerPrivateCommentInformation.php +30 −0 Go to diff View file
A plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/TrackerPrivateCommentInformationRetriever.php +43 −0 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/Comment/PrivateComment/TrackerPrivateCommentUGroupPermissionRetriever.php +9 −9 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Changeset/PostCreation/ActionsRunner.php +3 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset.class.php +7 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_ChangesetFactoryBuilder.class.php +7 −1 Go to diff View file
M plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset_Comment.class.php +21 −4 Go to diff View file
M plugins/tracker/include/Tracker/Report/Tracker_Report.class.php +3 −3 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/CachingTrackerPrivateCommentInformationRetrieverTest.php +56 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/PermissionCheckerTest.php +12 −12 Go to diff View file
A plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/TrackerPrivateCommentInformationRetrieverTest.php +54 −0 Go to diff View file
M plugins/tracker/tests/unit/Tracker/Artifact/Changeset/Comment/PrivateComment/TrackerPrivateCommentUGroupPermissionRetrieverTest.php +15 −15 Go to diff View file