Skip to content
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

Open
partofthething opened this issue Aug 24, 2020 · 6 comments
Open

High CPU usage #4

partofthething opened this issue Aug 24, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@partofthething
Copy link
Owner

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:

prof

We could alternatively make a sun-only mode that uses the alternative library pysolar which would likely be much faster.

@partofthething partofthething added the enhancement New feature or request label Aug 24, 2020
@brandon-rhodes
Copy link

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.

@partofthething
Copy link
Owner Author

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.

@brandon-rhodes
Copy link

Roger. I'll see about getting those docs written in the next few days, and I'll comment here with a link!

@brandon-rhodes
Copy 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!

@partofthething
Copy link
Owner Author

@brandon-rhodes thank you so much for checking in on this.

@roumano
Copy link

roumano commented May 10, 2022

Actually, the image is redraw every 10secondes.
It's should be good if it's exist a option to increase the delay between refresh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants