BMPR File Size: depends on... what?


#1

Hi there,

today I’ve found another interesting thing in Balsamiq. It turned out that BMPR file size doesn’t always depend on the content of the file itself. I’ve saved same very files with different names, and the sizes of the second files were always significantly smaller (the most impressive result was 2.3 MB vs. 5.4 MB!). Just to make it sure, I didn’t make ANY changes in my projects, all I’ve done was “Project” > "Save Project As…"
This size reduction works only once per project, tried to save the same file with a different name for the third time, the size didn’t change.
Attached is a screenshot showing the size differences, and this is a really impressive magic :slight_smile:

Has anyone else faced that?


#2

Hello @Liubi, thanks for the detailed email. BMPR is based off of SQLlite, which, for technical reasons, doesn’t automatically clear up space when you delete things. Here’s an article that explains the details: https://blogs.gnome.org/jnelson/2015/01/06/sqlite-vacuum-and-auto_vacuum/

We are going to start calling “vacuum” (i.e. “please free up any unneeded space”) every time you use “empty trash”. This should help maintain the file sizes small.

We’ll report back once the change is live.


#3

Hi @peldi, thanks for your reply!
This article is interesting, but I think I’ve faced another thing. I just saved the same project twice, without deleting, addind or editing anything there, and the second file was from 28% till 57% lighter.
But that is actually not a big issue, I’m glad that my files are now smaller. Just I find it strange.


#4

Right, that’s expected. On “Save As”, we create a brand new BMPR database from memory, so the new one doesn’t have any unused space like the original. We already implemented a fix, it will go live in the next release. Thanks!


#5

hi @peldi,
i didn’t think that it creates a new database every time I save my project, so now it makes sense! Thank you!