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

Slow beginning animation #1

Open
Vnaf opened this issue Aug 27, 2019 · 2 comments
Open

Slow beginning animation #1

Vnaf opened this issue Aug 27, 2019 · 2 comments

Comments

@Vnaf
Copy link

Vnaf commented Aug 27, 2019

Hi

I'm using your code in a rpi3 to run 1200 LEDs in a strip.

My plan is run a 1200x1px GIF on the script. it will be 990 frames, at 30fps

Right now, I'm trying with a 660 frames sample I did and it's working almost great

The thing is, when the GIF starts it takes a few seconds to start running at aimed fps, it's like if everytime the loop starts it takes some time to process it or something.

Sorry if I'm asking a silly question, I'm quite noob at python.

My setup is a Rpi3 with raspbian strech, I thought to switch to lite version of the OS and see if it helps.

I have plenty of power for LEDS (70 AMP) and I'm using a logic level converter between Pi and 2812's.

Maybe is a way to optimize this? Code wise I'm just using your demo, deleting everything before the animation.

Thanks

@Vnaf
Copy link
Author

Vnaf commented Aug 28, 2019

Hi

Looking further I've seen there a 100% usage of the CPU when the script is running.

Maybe is any point in the code where I can add a sleep function or something similar?

Thanks

@whizzzkid
Copy link
Owner

@Vnaf I missed your issue in other chatter, sorry about that. Can you share the sample?

What I feel is happening, is the time taken to fill the buffer is very large. It's taking a while to convert the initial frames that's why it is slow, once the entire gif is buffered, it just replays it. This behaviour totally makes sense.

However I feel, you can add a flag to render everything first which will make it faster or you can provide an interface to manually populate the buffer.

Let me see, what can be done. Again apologies for the delays.

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

No branches or pull requests

2 participants