From 8f4d6e576d9ea5f9b0bfeafb7820b4099ead02c5 Mon Sep 17 00:00:00 2001
From: hahn <axel.hahn@iml.unibe.ch>
Date: Mon, 29 Mar 2021 12:05:24 +0200
Subject: [PATCH] task#4364 - do not prefetch all commit messages

---
 public_html/deployment/classes/vcs.git.class.php | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/public_html/deployment/classes/vcs.git.class.php b/public_html/deployment/classes/vcs.git.class.php
index 5032ae77..d8d50f98 100644
--- a/public_html/deployment/classes/vcs.git.class.php
+++ b/public_html/deployment/classes/vcs.git.class.php
@@ -200,6 +200,7 @@ class vcs implements iVcs {
 
     /**
      * helper: cache hash with all branches
+     * It saves 1.5 sec for reading 300 branches
      * @return boolean
      */
     private function _cacheRemoteBranches() {
@@ -277,14 +278,14 @@ class vcs implements iVcs {
                         $sBranchKey = $sName;
                         $this->log(__FUNCTION__ . ' $sBranchKey = '.$sBranchKey);
 
-                        $sMessage = $this->getCommitmessageByBranch($sName, $sRevision);
+                        // $sMessage = $this->getCommitmessageByBranch($sName, $sRevision);
                         $aReturn[$sBranchKey] = array(
                             // 'debug'=> $aTmp,
                             'revision' => $sRevision,
                             'name' => $sName,
                             'label' => $sType . ': ' . $sBranch,
                             'type' => $sType,
-                            'message' => $sMessage
+                            // 'message' => $sMessage
                         );
                     }
                 }
-- 
GitLab