-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU usage #4
Comments
I am planning to write up soon a guide to faster Skyfield calculations, especially in cases where one does not need observatory-telescope accuracy in the positions. But first: may I ask what the frame rate is here? There's likely only a need to compute a position each, say, 10 minutes, and momentary positions could be linearly interpolated between the 10-minute positions with very little loss of precision. |
Awesome! I'm really happy to hear that. A frame rate of once/10 minutes would be completely adequate for this particular application, as when you're less than that the changes really aren't perceptible on this kind of a plot. In fact, one intermediate work-around would be to throttle the component to that kind of rate. At the moment, my update rate is closer to once/10 seconds, but that's just totally unnecessary. Still, fast lower-accuracy calcs would be super useful for this as even the once/10 min calc would be a struggle for a Raspberry Pi I think. |
Roger. I'll see about getting those docs written in the next few days, and I'll comment here with a link! |
As it's now been a fully quarter since my last comment, I should provide an update: I was derailed for a while on the question of why abbreviated nutation series were not behaving within the bounds I had seen claimed. Having returned a few times and continued my investigation, I think the numbers that folks offer are actually not meant to be true upper bounds on the error — hence the disagreement with the numbers I was getting. So at some point over this winter I think I'll have time to sit down and put together solid numbers of my own about how Skyfield users can sacrifice accuracy for speed by using less exact nutation computations. I still plan to provide an update here when I have something written up! |
@brandon-rhodes thank you so much for checking in on this. |
Actually, the image is redraw every 10secondes. |
This component uses a LOT of CPU, especially when running with constellations (but even without). In profiling, we can see that the python-skyfield library computing positions is a lot of work. Here is the profiler trace with constellations:
We could alternatively make a sun-only mode that uses the alternative library pysolar which would likely be much faster.
The text was updated successfully, but these errors were encountered: