Rhino.ViewDisplayModeProperty got VERY SLOW

hi @Dale,

Remember this fix to display mode methods?

Since the fix, the method become VERY slow to use. It is fine to change a few properties, but anything more is painfully slow. We have several tools, and a few more that I am working on, that modify a lot of properties on the go, for several display modes, and they became unusable as they freeze the system for a while.

My guess is it has to do with some internal settings update introduced to make the fix. Before the fix, the change of even 100s of properties was a blast/unnoticeable. Can the performance be improved?
Or perhaps keep the original fast way and provide another method to “update” the changes in one go, and not each time the method is called ?

Here is a sample script to demonstrate (it turns off all non-mesh/surface elements in all display modes, and then restores them):
SlowDisplayModeChanges_Example.rvb (9.5 KB)


Hi @Jarek,

Yes the fix make the function slower. This is because the “profile” for the display mode is being saved to the settings file. The bug that was fixed was due to not saving.

Sorry, I don’t have a workaround for this without adding new bloat to RhinoScript.

– Dale

Hi @Dale,

Please add my vote and need for a new bloat…
Could that be the same method as before fix (without saving settings file) and then a separate one to save settings file? For editing a lot of settings at once and then saving just once it would be perfect. I understand that it adds some cryptic functionality to RhinoScript, but now for most cases it killed the functionality of ViewDisplayModeProperty.
AFAIK I was the one that requested this method, and then found the “saving” bug… maybe third time’s a charm?