First time here? Check our help page!
1

Open Studio SketchUp Plugin CPU Demand

Doing something as simple as assigning space types to multiple selected spaces take a LONG time (using the "set attributes for selected spaces" tool). Same thing goes for "add new thermal zones for spaces with no thermal zones".

I have noticed that sketchup/OS plugin never takes more that 12% of my CPU resources.

Is there a way to speed this up? Or, does this mean the ruby programs are only single threaded?

Ski90Moo's avatar
869
Ski90Moo
asked 2019-11-05 15:48:00 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2020-01-07 17:18:18 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Sketchup is single-threaded, like most (if not all) 3d modelers out there. I assume you have 4 CPU which have hyperthreading, so 8 threads... Hence why you're seeing 12%: 100%/8 ~= 12% .

Adding new thermal zones for spaces with no thermal zones would probably be a lot faster using the ruby bindings directly.

# get all spaces
spaces = model.getSpaces

# loop through spaces
spaces.each do |space|
  next if !space.thermalZone.empty?
  z = OpenStudio::Model::ThermalZone.new(model)
  # Rename like space + " Zn"
  z.setName("#{space.name.to_s} Zn")
  space.setThermalZone(z)
end
Julien Marrec's avatar
29.7k
Julien Marrec
answered 2019-11-06 07:44:22 -0500, updated 2019-11-06 07:47:33 -0500
edit flag offensive 0 remove flag delete link

Comments

Thank you Julien. I have not yet delved into ruby programming as I am new to OS, but this looks like some good homework! :)

Ski90Moo's avatar Ski90Moo (2019-11-06 10:21:41 -0500) edit
add a comment see more comments