Python Grasshopper in Rhino 8 for OSX very unstable

Hello -

I’ve been extremely disappointed by the performance with Rhino 8 in OSX overall. It struggles to perform computational tasks of modest complexity.

Presently, I’m using Python in Grasshopper with Rhino 8 in OSX and I’m not even able to create a 13x13x13 array of points without a lag of over a minute. It also struggles to perform real-time parameter changes for even simple structures.

Similarly, I’m unable to create even moderately interesting vector field designs making the functions useless.

For context, I use MatLab on this same computer (and is able to comfortably manipulate complex-values 1000x1000x1000 matrices with only a slight delay.

I’m using an Apple M4 Pro with 64 GB on Sequoia 15.4.1

Help !
Anthony

I changed your topic category since this doesn’t seem to be a job offer.

Hi - I’m so sorry - not sure how that happened. What would you suggest the best topic category would have been ?

I guess Rhino for Mac?

In addition to that it might help to post your _SystemInfo and screenshots or a screen recording of what you’re doing and maybe even a Rhino file.

A sample of your script would help us understand what you are experiencing

1 Like

I cannot speak to rhino versus matlab. But I do use both windows and Mac for my regular computational design. In my experience, my Mac is significantly faster than my windows computer running the same scripts. This is comparing a current generation i9 to my m3 max. I would generally estimate a 30 to 40% compute time improvement. Some applications it’s less and some applications it’s more. However, due to just how AEC tech works and insist on being windows only, I still typically use my windows computer for work. My Mac is just my sketching machine.

I cant say with absolute certainty, but what you encounter has nothing to do with Rhino or macOS, and all to do with your python code.

It would go beyond the scope of a post trying to explain it in detail (and I would probably not be qualified enough to do well), but what i can tell you:

  • rhino python (not ironpython!) runs about as fast as normal python on your mac
  • points, grids etc. are lightweight data structures, rhinos overhead is negligible and not the reason for the slowdown you see.
  • python is not made for what you are trying to do. In the higher performance area it is meant as ‘glue’ or ‘organizer’ - you call methods from different packages that are all coded in C or C++, python is more of a top-level orchestrator
  • if you want speed, you need pytorch, numpy, scipy etc. - translating it from / to rhino data structures is then usually a bit slow, but the rest is as fast as it can be (sometimes much faster than matlab)

Also: if you want reasonable speed and semi-low level control, go with c#. Python makes only sense for complex tasks if the tasks itself run on the libraries / packages I mentioned above (and there are tons more)

To give you an simple example - writing a color pixel in a bitmap is about as fast today as it was 20 years ago. and if you set them in a loop one by one, you get about a million a second. At the same time you can set 1000x more pixels in the same time, but with different methods - lower level ones, that are exposed in libraries but come always with some caveats - e.g. the list of the pixels needs to be ready and passed in one go..

Bottom line - the more abstractions there are, the further you go from the hardware, the less performant your code becomes. Tools like Matlab or libraries like numpy try to bridge this gap with their own ‘way of doing things’ that give you access to speed, without knowing the hardware.
But you cant expect speed from a high-level language like python directly. It is just not made for it.

Thanks for the reply !

The issues I’m having are in the context of learning python from tutorials with basic examples. In the tutorial they seem to work fine on the PC they use. They are extremely simple tasks.

Do you really think it would be the python code ?

I decided to learn Python because it seemed best suited for multiple things I do, however, the idea of simply using C is appealing since Python is quite different. MatLab would be ideal for me but it doesn’t get rave reviews for Rhino/GH. I also need a language with robust graphic capabilities for mathematics outside of Rhino.

Either way – I remain disappointed with performance in many other ways. I actually purchased a new fastest Mac for this purpose (M4, 64GB). I’m not sure what more I can do to get even modest results. Interestingly, the computer performs very well with other applications.

Thanks !

Anthony

We can’t tell based on comments here alone. This is why I was hoping to see the script that is running very slow on your computer.

2 Likes

Using Rhino 8 on Macbook Intel 2013 + OCLP

I had problems with latest regular updates on my macbook. Had something to do with the way Metal was used. Besides the crashes, the machine was slow, and was hot all the time.

There has been an update:
Rhino 8 Service Release 21 Release Candidate 4 includes a fix to address the issue I reported!

Read here:

Maybe this is also help for you. Regards, Eef