Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
db5e7aee
Commit
db5e7aee
authored
2 weeks ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3520750
by alexpott: Use a transaction PoDatabaseWriter to improve performance
(cherry picked from commit
c15eed32
)
parent
362cab42
No related branches found
No related tags found
1 merge request
!12357
Issue #3529639 by mradcliffe, smustgrave, solomon.yifru: replacing a depricated css
Pipeline
#508959
passed with warnings
2 weeks ago
Stage: 🪄 Lint
Stage: 🗜️ Test
Pipeline: drupal
#508978
Pipeline: drupal
#508976
Pipeline: drupal
#508974
+4
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/locale/src/PoDatabaseWriter.php
+5
-0
5 additions, 0 deletions
core/modules/locale/src/PoDatabaseWriter.php
with
5 additions
and
0 deletions
core/modules/locale/src/PoDatabaseWriter.php
+
5
−
0
View file @
db5e7aee
...
...
@@ -198,10 +198,15 @@ public function writeItem(PoItem $item) {
* {@inheritdoc}
*/
public
function
writeItems
(
PoReaderInterface
$reader
,
$count
=
-
1
)
{
// Processing multiple writes in a transaction is quicker than committing
// each individual write.
$transaction
=
\Drupal
::
database
()
->
startTransaction
();
$forever
=
$count
==
-
1
;
while
((
$count
--
>
0
||
$forever
)
&&
(
$item
=
$reader
->
readItem
()))
{
$this
->
writeItem
(
$item
);
}
// Commit the transaction.
unset
(
$transaction
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment