Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting images won't reduce the file size from the first saved size. #99

Closed
spinear opened this issue Apr 4, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@spinear
Copy link

spinear commented Apr 4, 2024

Describe the bug
Deleting images won't reduce the file size from the first saved size.

System info
BeeRef version number: 0.3.2 (2024-01-21)
Your operating system: Windows 11 23H2

To Reproduce
Steps to reproduce the behavior:

  1. Image Storage Format: Always JPG
    Drag and drop around 100 images.

  2. Select All - Arrange - Optimal
    Ctrl+S Save
    Name the file
    Check the file size

  3. (It doesn't matter restart the app or not.)
    Delete images around 90 images.
    Ctrl+S Save

  4. The file size is the same as before.

  5. The file size will continue to increase if you keep adding images, deleting, adding again, and so on.

Expected behavior
if images are deleted, the file size should be reduced.

Screenshots
If applicable, add screenshots to help explain your problem.

Debug log:
For crashes and similar, provide the last 20 lines or so of your debug log. To get the debug log, open BeeRef and go to Help -> Show Debug Log. If in doubt, paste the whole debug log to a paste service like paste.bin

@spinear spinear added the bug Something isn't working label Apr 4, 2024
@rbreu rbreu closed this as completed in 82787d0 Apr 4, 2024
@rbreu
Copy link
Owner

rbreu commented Apr 4, 2024

Good catch, thank you. The fix will go out with the next release.

Technical background: bee files are sqlite databases, and sqlite by default hangs on to the disk space of deleted data to be used for new data. (So the files also weren't growing further if you added the same amount of images data back in.) The fix vacuums the file on every save.

@spinear
Copy link
Author

spinear commented Apr 5, 2024

Thank you. I've tested the Dev version. It works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants