This project is not covered by Drupal’s security advisory policy.

This module aims to keep a ton of redundant data out of the database by storing only the changes between revisions of an entity, in a diff file. When Drupal loads a past revision of an entity, this module first loads the current revision and then applies the diff files in sequence.

For example, suppose you create a node including values like this:

title: Things under my bed
field_things:
  -
    value: dog hair
  -
    value: unmatched socks
  -
    value: unspeakable horrors

Drupal stores the title in both the node_field_data and node_revision_data tables, and it stores the things in node__field_things and node_revision__field_things, one thing per row. That's a total of eight database rows for this revision, assuming there are no other fields on the node.

Now, suppose you edit the node, change just the title to "Things no longer under my bed" and save it. Drupal will update node_field_data to store the new title, and it will add a row to node_revision_data, retaining the old row. But it will also add three new rows to node_revision__field_things, even though those values did not change:

entity_id revision_id delta field_things_value
1 1 0 dog hair
1 1 1 unmatched socks
1 1 2 unspeakable horrors
1 2 0 dog hair
1 2 1 unmatched socks
1 2 2 unspeakable horrors

Now suppose you use smart_date_recur module to remind you to clean under your bed daily for the next 4 years. Now you have 1461 values in that date field. Every time you save the node, all of those values get saved again to their revision table, even if none of them changed!

With this module, regardless of how many fields and values there are on the node, the revision will store only the value(s) that changed.

Features

Who should consider using this module? Anyone who is alarmed by the ballooning size of their Drupal database. Entities with lots of fields, fields with lots of values, and entities that are frequently revised will particularly benefit.

Is this compatible with other modules? The goal is to be fully compatible and interoperable, yes.

Can database revisions be converted to diff revisions and vice versa in bulk? That is the goal, not yet implemented.

Post-Installation

TBD

Additional Requirements

TBD

TBD

Similar projects

If there are modules providing similar functionality, please describe what differentiates them.

Supporting this Module

If you have a Patreon, OpenCollective, etc. you can put links here to describe how people can support development.

Community Documentation

A great place to add links to YouTube walkthroughs, external documentation, or a demo site (use DrupalPod!).

Supporting organizations: 
paid development time

Project information

Releases