Rhino 8 Regression: CPython/IronPython RhinoCommon Performance Is Worse

Cheers @eirannejad, thanks for the breakdown. Some quick feedback:

Regarding CPython Performance:

I’ve been around since the Enthought 32 bit numpy days, so I’m very excited to finally have native CPython support. That said, I have not seen any performance reports on the forum yet, only regressions regarding RhinoCommon and rhinoscriptsyntax API breakages. So if you (McNeel) or one (us users) weren’t aware of this potentially quite severe .NET interop performance penalty, that seems like potentially important information when starting up a new project or porting over code from GHPython (i.e. when choosing between IronPython and CPython). It’s good to hear that this penalty might be mitigated, but perhaps it’s also information that ought be included in the Rhino Python and new script editor documentation.

Regarding IronPython Performance:

It’s great to have it confirmed that IronPython will not be dropped. And that GHPython is still included, though it’s currently borked. Unfortunately there has been a history of performance regression with GHPython. Most notably going from Rhino 5 to Rhino 6/7. Where the IronPython version changed, which led to notably worse performance. And the look-and-feel of the editor was updated, leading to severe breaking functionality. I understand and appreciate the desire to add new and shiny features. Especially when those are actually useful in practice (e.g. the debugger). But my personal preference will always be on snappiness and performance (I’m the type that toggles PS5 games from fidelity to performance). So I would expect and prefer the new IronPython editor to be at least as performant and snappy as GHPython (including loading the plugin, which is currently quite slow as well). Can I accept a minor performance regression for features I’d like/use, absolutely. But I’m not entirely convinced yet that it is minor. Here are eight test runs with the file above, where the average compute time is 157% longer with the new IronPython component, compared to GHPython. That’s not a trivial increase, in practice, in my experience:

Performance Test Screenshots








System Information

Rhino 8 SR4 2024-1-23 (Rhino 8, 8.4.24023.15001, Git hash:master @ e0f90d20c78f2125a0ec9cfffc9d9decbc052c01)
License type: Commercial, build 2024-01-23
License details: Cloud Zoo

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 32GB)
.NET 7.0.15

Computer platform: LAPTOP - Plugged in [100% battery remaining]

Hybrid graphics configuration.
Primary display: Intel(R) Iris(R) Xe Graphics (Intel) Memory: 1GB, Driver date: 11-7-2023 (M-D-Y).
> Integrated graphics device with 4 adapter port(s)
- Windows Main Display is laptop’s integrated screen or built-in port
Primary OpenGL: NVIDIA RTX 2000 Ada Generation Laptop GPU (NVidia) Memory: 8GB, Driver date: 6-26-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 536.45
> Integrated accelerated graphics device (shares primary device ports)
- Video pass-through to primary display device

OpenGL Settings
Safe mode: Off
Use accelerated hardware modes: On
Redraw scene when viewports are exposed: On
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 8x
Mip Map Filtering: Linear
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation
Render version: 4.6
Shading Language: 4.60 NVIDIA
Driver Date: 6-26-2023
Driver Version: 31.0.15.3645
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8188 MB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp “Grasshopper” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp “RhinoCodePlugin” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.4.24023.15001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

Regarding Productivity Issues:

It’s honestly mainly the look-and-feel design issues we’ve been discussing, which are preventing me from adopting the new editor (edit: and this performance issue). While those may seem silly, a quite serious one for me in terms of productivity is the issue of code/text legibility (i.e. due to font rendering and syntax highlighting). Where the new editor simply isn’t working for my eyes/brain. I’ll start a new topic elaborating in this when I find some time. And again, thanks so much for implementing a lot of these design suggestions :pray:

3 Likes