SketchUp RAM usage, can i free it?

Hey!
(using sketchup 2024)

I wonder if there is a way to free up sketchup memory during the usage.
I’m working on ‘SketchFramer’ Plugin, in short it’s plugin to create building from steel profiles. Each panel is uniq group and has a lot of parameters saved inside group.

We have a option to change ‘visualization’ from 3D full details into 3D bounding box representation. It’s working like this:

  1. User has panel in 3D representation
  2. User change it to 3D Bounding box representation
  3. Plugin destroys 3D representation and creates Bounding Box representation
  4. User change it back to 3D representation,
  5. Plugin destroys current representation and draw full details representation
    Etc. etc.

It looks like this:

The issue:
After few visualization changes, the RAM is only increasing, for example:

start usage:
image

After 10 change of visualization:
image

Even if I delete this groups from the scene, the memory don’t decrease

the worst part of this is the Mac systems. We have users who tells as that SketchUp eating their memory ;/

Any help to solve it?
Only working way which I know is to close/open Sketchup

From experience, I think that SketchUp does not recycle memory to the system until it closes. It “ high water mark”s. There is no way to force memory release from within SketchUp.

That said, such vast consumption of memory says your code is doing something excessive. Without seeing an example model or the code, I can’t say what.

For starters, check the “show nested components” box in model info. The model might have a lot more content than you realize. The fact that there is only one group and no component instances suggests that you are generating very large amounts of geometry, or perhaps hanging onto a very large number of Ruby objects, a large data store, or similar.

there was a massive memory leak in one of the recent Os, with people (on various applications) showing similar screenshots as you do right now.

the solution was to manually purge RAM using solutions like memory clean

Perhaps save the model, open a new empty model, (on Mac close the working model document window,) then reopen the working model.

You can also execute GC.start to have Ruby do a round of garbage collection.

Groups are really “special” component instances that do not appear in the Components inspector listing. Therefore, the geometry for group instances is contained within the Entities collection of a ComponentDefinition.

If your code does not also purge the DefinitionList collection, when you delete the group instances, then the group geometry will still be held within the model database. So be aware of the component definition count as your extension does it thing.

I disagree that “bounding box” is a good term for this. A bounding box has specific meaning in SketchUp and its “surfaces” have no thickness as they are a boundary.

I might instead call it one of these:

  • Enclosure
  • Periphery
  • Shell

What do other readers think ?

1 Like

We did fix one or two issues where memory use would keep on increasing. It would be worth having your customers try 2025, to see if the memory stays lower.

1 Like

I agree. The usage was unclear and ‘Bounding Box’ has a different meaning (at least how I interpret it).

  • Envelope
  • Container
  • Outer/Inner
1 Like