Skip to content

Conversation

dreampiggy
Copy link
Contributor

  1. Use CoreGraphics to avoid extra vImage convert and allocate of decoded thumbnail image buffer
  2. Use kvImageNoAllocate to avoi extra vImage to allocate 1x memory buffer (x means the input source image buffer)

See more in : SDWebImage/SDWebImage#3508

…full context and re-scale after decode finished This can help to avoid memory allocation For encoding, avoid using vImageConvert_AnyToAny and just use it convenience method instead
@dreampiggy
Copy link
Contributor Author

Tested by user in production app, has benefit on memory and reduce peak.

Due to the changes may effect the visible of thumbnail (because previously is actually a high-resolution and down-scale, now is directly thumbnail), it need the minor version update

@dreampiggy dreampiggy merged commit 9082448 into master Mar 16, 2023
@dreampiggy dreampiggy deleted the perf/awebp_thumbnail_allocation branch March 16, 2023 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant