Slow sunpath calc

I just want the vectors for each hour where the sun is up. ~4400 hours.

Why would this calc take so long?

I have a i7-4930k with 16 gb of ram. Not the best setup in the world, but not the worst either.

17.4 minutes to do some basic math?

Check your north input. Looks weird.

that’s just subtraction… nothing weird

First of all update your components. You are using version from 2018. But anyway, i don’t remember a version where the sunpath don’t have inputs referring to month, day and hours. Looks like you (or somebody else) deleted those in the example above.
After that iwould try to use those inputs instead of the HOYS. The component will calculate, and provide output, just for the daylight hours.

Thanks Abraham. I internalized the output from month day hours “analysis period” so it doesn’t need to be calculated again. It is only a list of integers. This shouldn’t affect the calculation time for the sunpath component. Can you point me to the latest version? The homepage is so cluttered and I can’t find the download link. On food4rhino, 2018 version is the latest.

  1. Use a single number for North. That doesn’t count as a subtraction. That’s a string not a piece of code.

  2. Flatten the input for hoys. You’re redrawing the sunpath geometry for each hoys input when you graft the input.

thanks. it was grafting.

fyi, the subtraction works because there is a type hint on the python input