SketchUp, I swear to dog

Had a few minutes spare so I decided to try clean up some early models, such as my roadwheels. I reduced the “standard” segment count to that of the existing circles with the fewest (60), thus cleaning up interfaces between mismatched circles; deleted a bunch of circles/cylinders (bolt thru-holes that can’t be seen when the wheel is assembled); and also culled a ton of other redundant edges and faces.

End result?

The file increased in size!

Here are the before and the after:

road_wheel_complete_assy_may_27_2023_1940.skp (1.8 MB)

road_wheel_complete_assy_october_06_2023_2240.skp (2.0 MB)

Beats me, but then I’m just a n00b…

The report on the right is from your file today.

Since you’re concerned about file size, it’s unfortunate you didn’t choose to use components in the model, especially for those elements that at repeated which seem to be all of them.

I modified your May version of the wheel to have components instead of groups. A little better than a 62% file size reduction.
road_wheel_complete_assy_components.skp (704.0 KB)

1 Like

Davepurated at it best!
Digital art gif. A corded microphone drops down and thuds onto the shaded floor. Text appears as the mic hits the floor, "Boom."

Why would the file size increase, though? I thought maybe my hilarious grouping in the “after” version may have messed with things, but the larger size remained even when I fixed that. You’d maybe think the size would reduce after a clean up. Well, I thought it would (and should).

Additional group. Notice there are two instances of Group#7 in the file from May. There’s only one in the one from today implying you opened one of them for editing which changed it and made it unique from the other. So now you have two group definitions. Group#7 and Group#11. That would cause a file size increase.


Funny! Thank you, though.

By the way, I developed a habit some years ago that if I use a date in a file name I use 20231006 or 2023-10-06 instead of 10-6-2023 or October 6, 2023 so that they sort nicely in the Finder when I look down a list full of file names.


Windows Explorer laughs at logical filing systems.

Did you look at the version of the file I uploaded?

Yes. I’m still trying to recover from it.


After you uploaded your version I went back and looked at my own latest file and realized the grouping was messed up pretty badly. Guess I was in too much of a hurry to come complain here! So anyway, I tidied that up too. It made no difference to the file size.


Look closely at what I changed in your model. My guess is your larger project would benefit from the same sort of change.

Dude, you turned it into some kind of magic version of my file. I feel like Unfrozen Caveman SketchUper.


A little more magic for you:

Here are 49 full sets of your road wheel assembly. File size increase over one of them is about 1%.


Pffft. Lame. When I add all sixteen assemblies the total is more than 32 MB for the wheels alone!

Call me if you ever want to learn to go big, Dave.


@DaveR So after completely un-grouping both models, the new cleaned-up file weighs in at ~1.5MB, and the old one is now ~2.0MB as I’d have expected.

Groups are weird. Not as weird as components, but still pretty weird.

EDIT: So, in the end, when the models were regrouped, all that cleanup saved me a whopping 130KB! :laughing:

A group is exactly a component until the group is opened for editing. Then an automatic “Make Unique” operation is applied to the group being opened. This is easy to see by experiment (and it has predictable consequences for SKP file size, see below).

Make a new group. Make two copies of the group (with Copy and Paste, or with the Move tool and radial or linear array). The original group and all its copies are instances of a shared implicit component definition #1 (but that definition is hidden from the Components browser). Select the original or any of the copies and look at Entity Info. It should say that one object is selected, and there are three total such objects in the model (all of which are instances of definition #1).

Now double-click on any of the three, and then close it. This will create definition #2 as a copy of definition #1. If you select that one group, Entity Info should say that there is one object selected, and there is one such object in the model (an instance of definition #2). If you select either of the other two groups, Entity Info should say that one object is selected and that there are two such objects in the model (each of which is an instance of definition #1). Groups are components (with the wrinkle of automatic make-unique)!

Updated to add: After a group has been opened by the user and thus its definition has been automatically made unique by SketchUp, that group is still essentially a component - simply an instance of definition #2. If you make copies of that “unique-ified” group, the copies will be instances of the definition #2. (This continues ad-nauseam: open one of the copes of the unique-ified group, and SketchUp will automatically make it unique, creating definition #3.)

Regarding the impact of groups vs. components on SKP file size (ignoring the ZIP compression that is applied to recent versions), the basic situation is relatively straightforward: with a component, the SKP file contains a large-ish blob of data describing the definition of the component (whose size depends on the amount and type of entities within the definition), and a small more-of-less fixed-size blob of data for every instance of the component in the file (essentially a reference to what definition is the instance derived from, a transformation matrix for locating and sizing etc. the instance, and a name for the instance). So if you have three instances of a component, the SKP file #1 will contain:

  • A blob of data containing the component definition. This could be pretty large if the component has millions of edges and faces etc.
  • Three small blobs of data, each blob describing the location and scaling etc. one of the three instances of the component definition.

Now consider groups. Recall that groups are essentially exactly the same as components with the exception of the automatic Make Unique operation that is applied when opening a group. If you follow the experimental scenario I proposed above to create a group and make two copies and then saved the SKP file #2 at that point, the file would have:

  • A blob of data containing the group’s implicit component definition. This could be pretty large if the group contains lots of entities.
  • Three small blobs of data, each blob describing one of the three instance of the group definition (the original and two copies).

The size of this SKP file #2 would be very close to the size of the SKP file #1 that contains “authentic” components.

Now complete the experiment by opening and closing one of the three groups, and save SKP file #3. This file will have:

  • A blob of data containing the definition of the unique group (the instance of the group that was opened and closed).
  • A small blob of data describing the group that was opened and closed, derived from the above first definition.
  • A blob of data containing the definition of the group that pertains to the other two instances of the group. This second definition will be identical to the first definition, assuming that no actual modifications were done when one of the groups was opened and closed.
  • Two small blobs of data, each blob describing one of the two unopened instances of the group, derived from the second definition.

The size of SKP file #3 would be larger than the sizes of SKP files #1 or #2 due mostly to the second complete definition that is now contained in the model.

The exact file sizes depend in detail on whatever algorithm SketchUp might use to allocate file space in fixed-size increments or packed buffers. So small differences (of the order of 1KB to 10KB) are probably due to the file packing algorithm, rather than the internal objects in the model.


Uhhh… I, uhhh…

Your Viking lander model is amazing, dude.

1 Like

@Tdahl and @DaveR
Thanks for your explanation and analysis! :+1:
It helps us who aren’t programmers to understand what is going on in the background of SU. Might even help us problem solve an issue on our own.

1 Like