Skip to content

Theme files grow permanently with each edit and don't shrink after deleting content #342

@rzusto

Description

@rzusto

Description

Every time I add a block/component in the editor, my theme HTML files grow much larger than they should. When I delete blocks, the files don't return to their original size - they stay bloated.

Steps to reproduce

  1. Check landing theme index.html file size: 50KB, 922 lines
  2. Add one block in the editor and save
  3. File grows to 56KB, 1032 lines (+6KB for one block!)
  4. Add another block and save
  5. File grows to 58KB, 1062 lines
  6. Delete both blocks that were just added
  7. File size is now 55KB, 1003 lines - it did NOT return to the original 50KB

Expected behavior

  • When I delete content, the file size should decrease back to what it was
  • Adding one simple block shouldn't add 6KB to the file

Actual behavior

  • Files grow permanently with each edit
  • Deleting content leaves "garbage" in the files - they stay larger than before
  • After adding and removing 2 blocks, the file is still 5KB larger than it started
  • Clearing cache doesn't help

Impact

After editing a theme multiple times, files become huge. My julia-portfolio/index.html grew to 628KB (9,219 lines) and caused the website to timeout. The site was using 100% CPU just trying to load one page.

Is this a known issue? Is there a way to prevent files from growing like this?

Environment

  • Vvveb version: latest from GitHub
  • PHP 8.3
  • Theme: landing (but happens with all themes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions