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

Linear Output with is_loop has Poor Performance #135

Open
CaiB opened this issue Nov 29, 2023 · 0 comments
Open

Linear Output with is_loop has Poor Performance #135

CaiB opened this issue Nov 29, 2023 · 0 comments

Comments

@CaiB
Copy link
Collaborator

CaiB commented Nov 29, 2023

In the Linear visualizer, when is_loop = 1, the complexity of positioning LEDs around the ring becomes O(n^2), with n being the number of LEDs.

I noticed this while profiling CC.NET when I happened to have a Linear visualizer running with 720 LEDs in this mode. The code is functionally identical:
image

Location of this loop in ColorChord: https://github.com/cnlohr/colorchord/blob/master/colorchord2/OutputLinear.c#L142-L147

If I get around to fixing it in CC.NET first, I'll let you know or open a PR with a fix. Likewise, if you end up fixing it here first, LMK.

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

1 participant