Binary Project (default) size ?

I have a problem with a project and I think I recall the change I’ve done some hours ago. In the macOS Finder, I duplicated that project.

So, I load the (duplicated) project file (default kind, xojo_binary_project) and removed four lines (one comment, one simple Module Property FolderItem change) and two empty lines).

I saved the changes, then I checked the file length of the two projects.

What a surprise, the two project files have the same length.

Why ?

Nota: the project have the same problem, then I do not squashed it. I will use my last backup who works fine (does not suffer from the trouble). The file size difference between this last backup and today’s changed project is very small, some hundred bytes (or less than 100 Bytes)…

What is the problem?

I think that HE thinks that a project file should change size consistent with the additions or deletions made between versions… and that simply isn’t a true statement

So, a project size does not vary depending on the addition or delition of data ?

Strange and against everything I saw / learn from 1980 to 2017…

Is this the 2017 new paradigm ?

Of course it does, except when it doesn’t
and probably for the same reason a database file may or may not change size when you add or delete records.
because there is unallocated blocks within the file structure, that may be where deleted data HAD been, or may have been used when new data was added.

I’ll bet dollars to doughnuts, that if you were to take one of those projects saved in Binary (where you THOUGHT the filesize should have changed), save it in Xojo XML format, reload it, and save it in Binary AGAIN… then I’d say you might see the size change. XML format won’t keep any unallocated file space, and would write a “clean” copy

Please note my liberal use of MAY and MIGHT…

and MOST systems (1970-1995ish) probably saved in a text format not a “binary” format… I know that VB6 was pure text for example.

deleting four lines is not much, remove a control and it will have a smaller file size

And on OS X it will depend on if you’re looking at the Get Info window which shows actual bytes used
Deleting 4 lines of code would show a decrease in the # of bytes used but the number of blocks allocated may remain the same
At least it does here

The difference between the two projects (modified days ago <-> today) is around 1,000Bytes.

Today removal of some characters (around 80 Bytes or 2 x 80 bytes) is small, but as Norman says, can be seen. I checked the real number of Bytes, not the logical size. I wanted to know if I had a local bug.

I was writing a Hex file displayer and found by pure hazard * that xojo_binary_project files are filled with 2A (*) to be block complete (the number of Bytes = the value in KB / MB / GB)…

xojo_binary_project files, the logical size = the hardware size, always. So to get a difference between two xojo projects, one have to make more than the size fo a harware block size.

So, if I remove less Bytes than a hardware block / logical block (depends on the hard disk size), the project size is identical.

I was not searching that, I only was debuging the Hex displayer using different files.

Tested with Xojo 2016r4.1.

The logical size is a function of the block size of your HD
And that used to vary as the size of the HD grew (dont know if that is still true but I suspect it is)
Enormous hd’s tended to have larger block sizes so small files wasted space