pachli-android/core/common
Nik Clayton 33e1b418cf
refactor: Improve blurhash decoding performance (#770)
By Christophe Beyls in https://github.com/tuskyapp/Tusky/pull/4515.
Their commit notes:

Improve the performance of `BlurHashDecoder` while also reducing memory
allocations.

- Precompute cosines tables before composing the image so each cosine
value is only computed once.
- Compute cosines tables once if both are identical (for square images
with the same number of colors in both dimensions).
- Store colors in a one-dimension array instead of a two-dimension array
to reduce memory allocations.
- Use a simple String.indexOf() to find the index of a Base83 char,
which is both faster and needs less memory than a HashMap thanks to
better locality and no boxing of chars.
- No cache is used, so computations may be performed in parallel on
background threads without the need for synchronization which limits
throughput.
2024-06-20 13:19:15 +02:00
..
src refactor: Improve blurhash decoding performance (#770) 2024-06-20 13:19:15 +02:00
build.gradle.kts refactor: Remove unnecesary parcelize plugin import (#407) 2024-02-02 15:12:55 +01:00
lint-baseline.xml chore(deps): update agp to v8.5.0, lint to 31.5.0 (#756) 2024-06-18 13:58:37 +02:00