martin-stone / hsv-alpha-color-picker-android

A color picker and a color preference for use in Android applications.
Apache License 2.0
290 stars 60 forks source link

Delay >1 second when opening preference #28

Closed aloz77 closed 7 years ago

aloz77 commented 7 years ago

Great lib! There could be a performance problem somewhere. On my Nexus 7 (pretty fast device) with Android 6.0.1 it takes more than one second to open the colorpicker preference after the tap on the setting.

martin-stone commented 7 years ago

I've just quickly looked at the obvious -- generation of the hue/sat bitmap -- and tried caching it. Doesn't seem to make much difference for me. If you have time to do some proper profiling and report where the bottleneck is, I'd be interested in the results.

I'm a little snowed under at the moment, so can't give this my full attention right now.

martin-stone commented 7 years ago

Hi @aloz77. Can you retest this with the latest version of the library (v 2.1.0)? I've added an optimisation that removes lag when animating the color picker view size. It may have been the cause of your problem too. (And may explain why we were seeing different behaviour, if my transitions weren't animated.)

aloz77 commented 7 years ago

Thank you, now it works fine and fast with Nexus 7.

martin-stone commented 7 years ago

Thanks for confirming.