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

Gradient color picker insanely slow #645

Closed
yaboy365 opened this issue Feb 2, 2022 · 3 comments · Fixed by #677
Closed

Gradient color picker insanely slow #645

yaboy365 opened this issue Feb 2, 2022 · 3 comments · Fixed by #677
Labels
performance issue Something needs optimization

Comments

@yaboy365
Copy link

yaboy365 commented Feb 2, 2022

Pixelorama version:

0.92

Issue description:

When using the gradient tool, and choosing 1 of the 2 colors, the color selector is very slow. Even more for larger images. The application remains frozen until it eventually catches up. This issue is also present in 0.91, but surprisingly NOT in 0.9, where it's very quick.

ALSO is the gradient preview, actually the same dimensions as the image? If yes, then maybe, for optimization, it could be replaced by a smaller image of the same proportions. (Like a 100x100 for any square image, since that's the max number of gradient steps.)

Steps to reproduce:

  1. Create new image (Bigger dimensions like 512x512 make it more noticeable)
  2. Select the gradient tool.
  3. Click any of the 2 colors to open the color selector.
  4. Move the RGB sliders, or wiggle the crosshair in the color square.
@yaboy365 yaboy365 added the bug Something isn't working label Feb 2, 2022
@Variable-ind
Copy link
Contributor

I can confirm it. Maybe we should make a shader for it as well.

@OverloadedOrama
Copy link
Member

I enabled deferred mode for the color pickers, which means that the color gets applied only when the user releases the mouse button when inside the color square, so it won't be slow anymore when the user wiggles the crosshair in the color square. Still, there is some room for optimizations which we could look into in the future.

@OverloadedOrama
Copy link
Member

Nevermind, I am going to re-open this issue because I just realized that, while the color square issue is gone, moving the RGB sliders is still very slow. My guess is that something changed in the frequency of the color application of the ColorPicker in Godot's side. v0.9 was using Godot 3.3, v0.9.1 and v0.9.2 were using Godot 3.4. There was no change in the gradient generation code in Pixelorama between versions 0.9 and 0.9.1.

@OverloadedOrama OverloadedOrama added performance issue Something needs optimization and removed bug Something isn't working labels Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance issue Something needs optimization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants