sunrisesunset icon indicating copy to clipboard operation
sunrisesunset copied to clipboard

Consider adding execution time info to README.md

Open fimdomeio opened this issue 3 years ago • 2 comments

This library seems to be doing some quite a lot of calculations.
In a raspberrypi 4 it takes around 7 seconds to calculate the sunrise and sunset. My initial expectations was that it would only take a few ms and only noticed a few days later.

Maybe there should be a line in the readme like: Calculating the sunrise and sunset can take a few seconds to calculate on most computers. You might want to plan your code accordingly.

fimdomeio avatar Jun 06 '22 23:06 fimdomeio

I ran into the same issue. You could check out https://github.com/nathan-osman/go-sunrise. It calculates the sunrise and sunset on a raspberry pi compute module 4 within 30us. I haven't really looked into why the differences are so big. But it gives the same results.

wipsel avatar Oct 24 '22 11:10 wipsel

Hi, thanks for pointing this out. I wrote this code a long time ago and I'm not using it anymore. Anyway, feel free to open a PR to include this information in the README, I'll be happy to review it.

kelvins avatar Oct 24 '22 12:10 kelvins