Massive file size increase after joining meshes/objects

This seems similar to Massive file size increase after joining objects. I’ve got a scene and merging objects changed my file size from 82MB to 1.4GB.

I iterated over my meshes to check the users count and there no meshes that have more than 1 user count. I iterated over the meshes like:

for m in bpy.data.meshes:
    if m.users > 1: 
        print(m.name, m.users)

I assume that Mesh.users, which is described as Number of times this data-block is referenced shows the number of time the mesh data is used by other objects.

So if all meshes are only used once by an object how can the file size increase this much?

Have you saved the file just once? Look in the Orphan Data view of the outliner, there may be some orphan data still present. You can purge it from there using the Purge button, or save/reload the file a few times.

@Stan_Pancakes, thanks for your suggestion.

I’ve just purged all data and the file size is still the same. I’ve reset my settings and executed the script to remove all blocks that have no users too: https://blender.stackexchange.com/questions/102025/how-to-prevent-memory-leakage-in-blender

Well hmm. Other than trying to compress it by ticking the option in the save dialog, I can’t think of anything else.

I’m pretty sure this is a bug or at least something that should not happen.

I just exported the ~1.2GB file to an .OBJ and the .OBJ file size is ~35MB. I created a new .blend file, imported the OBJ and saved it again. The resulting size is of the .blend file is ~57MB. :roll_eyes:

Have you tried with 2.80? 2.81 does seem to have at least one issue with incorrect link counts, could be there are more, or perhaps that one is somehow related.

Just tried with 2.82 and 2.80; I opened the huge file purged ophaned data and then saved again. This made no difference.

I’m thinking about a work-around where I export to another format (e.g. OBJ seems to work ok) and then import it again. The only thing is, that I created about ~200 collections to organize everhthing :sob: hopefully there is a export/import solution that maintains collections?

I created a bug report: https://developer.blender.org/T71823

Minor update :sweat_smile:

I enabled compression (click the gogs icon when saving the file) which reduced the file size to 18MB. Still I think this is a bug as the 1.2GB can never be the uncompressed size of 18MB.

1 Like

I guess ‘Compress’ is really misleading name, we should push for it to be renamed to ‘Ungunkify’. :wink: