Better average color extraction infra #37
Labels
No labels
bug
duplicate
feature
accepted
feature
proposal
help wanted
invalid
performance
question
user-agent/chromium
user-agent/webkit
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Rubicon/tutu#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We frequently use
FastAverageColor
and it's slow. We may need further managing to control its performance impact.I am considering extracting the average colour from blurhash if we have the blurhash. That seems it’s easy enough to implement the average colour and even the css gradient - it even directly encodes the average color in the hash. I think it’s a good way to reduce the hunger of the performance by reducing the use of the FastAverageColor (which uses canvas).
Related links:
As I considered, we can write the decoders in zig, and directly plug them in as the WASM. Our targets all support WASM.
For toot attachments and previews, now we can use the average colour from the blurhash. The banner image of profiles does not provide blurhash alongside - we could not optimize this use case tho.