Grasshopper file (gh) take minutes to open or edit

Hi guys,
unfortunately it takes several minutes to even open a Grasshopper file.
As soon as I can work within in, changing a single parameter takes even longer.

Any ideas why grasshopper is so slow on my end?

P.S.: I’m using a file provided by my tutor, see attached. Maybe the file is broken? It’s my first time with Grasshopper and I see that the BREP-square is displayed in red and a comment “invalid cast”

PixelFassade.gh (24.9 KB)invalid cast

The code works fine for me, no “Invalid cast” error. I disabled the solver before opening the file and then disabled parts of it that are known to be slow (primarily SDiff) before re-enabling it to examine the model. The very last component (SDiff) is extremely slow (5.2 minutes) and should be disabled in order to examine and understand the rest of the file. Ideally, the model would be wired such that SDiff is executed only when you want to, not every time you make any change to a parameter.

2 Likes

Thanks to Joseph’s warning I reduced Panels Count XY to 3 and got this result in 1,2 seconds:

The file worked just fine.

2 Likes

Do you used boolean?

1 Like


RandomPatternBox_re.gh (11.9 KB)

1 Like

The previous answers are excellent examples of solutions to the problem.

As a newcomer to the conversation I’ll summarize the learning opportunity here.

In any complex CAD model in any CAD software, it is very important to learn the skill of working with calculation-heavy models without wasting time waiting all day.

As Joseph mentioned, you can temporarily disable all or part of the model. Disabling the entire solver is an easy way to make adjustments. Another way is to disable the troublesome component manually or by addition of a “data dam” component just upstream of the killer component (SDiff in this case), so the componenet doesn’t calculate until you press play on the data dam, but everything upstream of the data dam will calculate as normal.

My first though was as Birk mentioned, which is to work with the square count greatly reduced, until you are ready to be patient for the full calc, then jack the square count back up and/or click play on the data dam.

1 Like

The trouble with Data Dam is that it has no effect when opening the file. It will always execute once.

Excellent advice. Debug at “low resolution” and then crank it up and go for a walk.

2 Likes

Thanks a lot.
Though, how did you open the file (to adjust the setting) if not loading it into Rhino?

In Grasshopper, on an empty spot on the canvas, either click the middle mouse button (1st image) or right-click the mouse (2nd image) and “Lock Solver” before opening the GH file.

lock_solver

lock_solver2

1 Like

Thanks, Joseph!