Postponed
Project:
Drupal core
Version:
main
Component:
layout_builder.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Mar 2022 at 20:19 UTC
Updated:
6 Jun 2025 at 08:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
effulgentsia commentedComment #3
effulgentsia commentedComment #6
podarokHi.
Thanks for this issue.
I'm changing this from feature request to bug request because on production this is getting rough
Example
https://www.drupal.org/files/issues/2023-02-07/image%20%283%29.png
203 nodes with Layout Builder enabled, which have 3-132 revisions, 6-12 sections on every node equal 1.2Gb of table size, which is a nightmare for backup/restore and local/dev imports/builds.
From our investigation - the majority of the sections are unchanged.
layout_builder__layout_section column of node_revision__layout_builder__layout table contains serialised Object of respective section.
Improvements we may have
- Make this table/column as COMPRESSED on DB level ( more workaround, not actual fix )
- move these sections to other table via hash/id
- make section as revisionable entity and instead of keeping it within node_revision__layout_builder__layout table - use reference to the section revision.
On heavy sites with a lot of Layout Builder
nodes*revision*section = a lot of disk space and slowness.
Bug is
- we keep copy of the serialized object in layout_section column for every delta in every other revision - waste of space
Solution
- We need to avoid keeping copy of same data and use references/joins in DB going forward
Comment #7
steinmb commentedComment #8
hmdnawaz commentedIs someone working on this? No progress from the last year?
I have the same issue. The total size of the database is 1.2GB. In which 982MB is only this table
node_revision__layout_builder__layout.Comment #9
podarokre #8 - we installed node_revision_delete and set some values to keep DB size in control, but still root cause wasn't solved
Comment #10
catchBumping this to major, this could result in sites going out of disk space on some hosting plans - lots of specific restrictions on database size.
Comment #11
solideogloria commentedI think this is a good idea as well.
Comment #12
hmdnawaz commentedAny update on this issue? or any workaround instead of using node_revision_delete?
Comment #14
ihamadet commentedFor now, even node_revision_delete won't delete revisions in
node_revision__layout_builder__layout.I created a feature request to ask for this to be included in node_revision_delete: https://www.drupal.org/project/node_revision_delete/issues/3388227
Comment #15
kunalkursija commentedThe
node_revision__layout_builder__layouttable can get very large on content-heavy enterprise sites—mine is over 20GB. I'm planning to regularly truncate old revisions in production to manage its size. It's not ideal, But a workaround.Comment #16
andyf commentedIt seems to me there's a lot of overlap between this and #3469082: Add way to "intern" large field item values to reduce database size by 10x to 100x for sites with many entity revisions and/or languages, although there's the mention of optimizing for inline blocks in this ticket.
Is it worth postponing on that and leaving this as a potential optimization?
Comment #17
catchYes I think we should postpone this on #3469082: Add way to "intern" large field item values to reduce database size by 10x to 100x for sites with many entity revisions and/or languages, that would implicitly fix the issue for a lot of different fields then.