Use mysqli->autocommit(false) to speed up autotranslating

This commit is contained in:
Joshua Ramon Enslin 2021-03-08 21:23:38 +01:00
parent 7ab7b8341f
commit 1fe795d219
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -864,11 +864,16 @@ final class NodaTimeAutotranslater {
$translations = self::getTranslations($timeInfo);
$this->_mysqli_noda->autocommit(false);
foreach ($translations as $tLang => $tLangValue) {
$this->_insertStmt->bind_param("iss", $this->_znum, $tLang, $tLangValue);
$this->_insertStmt->execute();
}
$this->_mysqli_noda->commit();
$this->_mysqli_noda->autocommit(true);
}
/**