From: Alexander Ebert Date: Sat, 31 Jan 2015 21:52:54 +0000 (+0100) Subject: Improved insert speed on default MySQL setups X-Git-Tag: 2.1.0_Beta_4~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=820f70d0930eab9ac0bd98f11d4035b0352f1d33;p=GitHub%2FWoltLab%2FWCF.git Improved insert speed on default MySQL setups --- diff --git a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php index 5cba4d84e4..6fa770eb22 100644 --- a/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageUpdateDispatcher.class.php @@ -324,6 +324,7 @@ class PackageUpdateDispatcher extends SingletonFactory { protected function savePackageUpdates(array &$allNewPackages, $packageUpdateServerID) { // insert updates $excludedPackagesParameters = $fromversionParameters = $insertParameters = $optionalInserts = $requirementInserts = array(); + WCF::getDB()->beginTransaction(); foreach ($allNewPackages as $identifier => $packageData) { // create new database entry $packageUpdate = PackageUpdateEditor::create(array( @@ -402,6 +403,7 @@ class PackageUpdateDispatcher extends SingletonFactory { } } } + WCF::getDB()->commitTransaction(); // save requirements, excluded packages and fromversions // insert requirements