For instance: iterating through a collection of entities and deleting some:
Example - deleting faces.
This is slow
entities.each { |e| e.erase! if e.is_a?(Sketchup::Face) }
This is faster:
faces = [] entities.each { |e| faces << e if e.is_a?(Sketchup::Face) } entities.erase_entities(faces)
Same goes for selection/deselecting.
Anything where SU offers to do either per item or as an array of items - try to pass array of items.