Follow up for #1498674: Refactor node properties to multilingual

Problem/Motivation

Performance improvement.

In 1498674 was the @todo

+        // @todo Use multiple insertions to improve performance.

On the line in the patch in comment #303:
503

The line of the final patch might change but that info might help to find them.

For example,

+      if ($entity->isNewRevision()) {
+        drupal_write_record($this->revisionTable, $record);
+        if ($entity->isDefaultRevision()) {
+          $this->database->update($this->entityInfo['base_table'])
+            ->fields(array($this->revisionKey => $record->{$this->revisionKey}))
+            ->condition($this->idKey, $record->{$this->idKey})
+            ->execute();
+        }
+        $entity->setNewRevision(FALSE);
       }
-      $entity->setNewRevision(FALSE);
-    }
-    else {
-      drupal_write_record($this->revisionTable, $record, $this->revisionKey);
+      else {
+        // @todo Use multiple insertions to improve performance.
+        drupal_write_record($this->revisionTable, $record);
+      }

Proposed resolution

Change

+        drupal_write_record($this->revisionTable, $record);

to use multiple insertions.

Remaining tasks

  • performance profile

User interface changes

No.

API changes

No.

Comments

amateescu’s picture

Status: Active » Closed (cannot reproduce)

This @todo can not be found in the current codebase so it was probably done as part of the entity storage work last year.