Strange one for you - Purging Objects - can Freeze Rhino - but only if you have an object selected.
I can replicate this on two differently specified windows 11 PC’s but not on a 3rd.
Notice the 5 second lag the second time the script is run below!
This is a toy example but the real issue is causing up to 10minute freezes on our CNC machines & preventing our recommending an upgrade to Rhino 8 to customers.
To reproduce
Open new Document
Run Script
Notice times are very close together
Draw a rectangle
Select Rectangle
Run Script
Notice Significant Freeze and gap between times
using System;
using Rhino;
using System.Linq;
using Rhino.Geometry;
using Rhino.DocObjects;
var doc = RhinoDoc.ActiveDoc;
// create / find reference layer
int layerId = doc.Layers.FindName("Ref")?.Index ?? doc.Layers.AddReferenceLayer(new Layer { Name = "Ref"});
var layer = doc.Layers.FindIndex(layerId);
// add reference objects
for (int i = 0; i < 1000; i++)
{
var circle = new Circle(50).ToNurbsCurve();
doc.Objects.Add(circle,new ObjectAttributes {LayerIndex = layerId});
}
Console.WriteLine("Created "+ DateTime.Now.ToString("hh.mm.ss.ffffff"));
// delete them
doc.Objects.FindByLayer(layer)?.All(doc.Objects.Purge);
Console.WriteLine("Deleted " +DateTime.Now.ToString("hh.mm.ss.ffffff"));
We updated the Nvidia driver on one affected machine and the slowdown running the above script with a rectangle selected went from a 5 second to 40 seconds (!) SysInfo_Occurs_Driver_Update.txt (2.3 KB)
Hi @david.birch.uk ,
I have tried it and I can’t reproduce it either.
Could you please send us information about the computers on which it is not working properly? Please check that they have the latest service version of Rhino 8 installed and that Windows has all updates installed.
Hello David
Can you try to disable all Plug-ins that do not ship with Rhino , using the plug-in manager, and re-test?
The system’s video card is not the issue as the script never redraws the screen.
Thanks
Thank you @Guillermo_Varela i have tested this today on 8SR8 & SR9 with both your script and mine. I am unable to replicate the issue. Your script reliably runs in 3-4ms regardless of whether anything is selected.
I note with interest that there was a NVidia driver update installed on the machine on June 12th so i suspect this resolved this issue.