Skip to content

feat(output): Implement incremental save functionality for packs (fixes #512)#513

Open
Stoupy51 wants to merge 3 commits into
mcbeet:mainfrom
Stoupy51:main
Open

feat(output): Implement incremental save functionality for packs (fixes #512)#513
Stoupy51 wants to merge 3 commits into
mcbeet:mainfrom
Stoupy51:main

Conversation

@Stoupy51
Copy link
Copy Markdown

@Stoupy51 Stoupy51 commented May 9, 2026

Fixes #512

A new incremental option (default to false) can be given to the output plugin.
either OutputOptions or in beet.yml:

meta:
  output:
    incremental: true

When enabled:

  • Files no longer in the pack are deleted individually instead of wiping the whole directory
  • Possible empty directories left over are pruned bottom-up
  • Files already on disk and unchanged are skipped
  • Only new files (or modified) are written

File watchers will now be in pain each build.
On my tests, I get faster build time, idk if you want to make it True by default so I put at False.

Copilot AI review requested due to automatic review settings May 9, 2026 16:05
@Stoupy51
Copy link
Copy Markdown
Author

Stoupy51 commented May 9, 2026

Damn, didn't thought copilot review would start automatically on another repo beside mines

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an incremental output mode to the output contrib plugin to avoid wiping and rewriting entire pack directories on every build, addressing performance issues for large projects (issue #512).

Changes:

  • Add incremental: bool to OutputOptions (default False).
  • Implement incremental_save() to delete removed files, prune empty directories, and skip writing unchanged files.
  • Update output() to use incremental saving for non-zipped packs when enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/beet/contrib/output.py
Comment thread src/beet/contrib/output.py
Comment thread src/beet/contrib/output.py Outdated
Comment thread src/beet/contrib/output.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Big projects output is very slow due to rewrite of all files each build

2 participants