My first ruby plugin to generate an Archimedean spiral is executing too slowly

Sketchup.version_number class_method

Sketchup.version class_method

Checking SketchUp version in API - Developers / Ruby API - SketchUp Community