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

Fix the issue when WebP is static webp, the SDAnimatedImageCoder protocol implementation still create CGContext, this can reduce RAM usage #30

Merged
merged 2 commits into from
Jan 7, 2020

Conversation

dreampiggy
Copy link
Contributor

This is a quick fix for #29.

For Static WebP, we don't create extra CGContext to consume RAM. Instead, just do the static WebP decoding.

Note this method still need to be protected in the LOCK/UNLOCK code, because multiple thread can access the animatedImageFrameAtIndex:, and we share the global _demux instance.

The root solution is in 5.4.2 of SDWebImage, see: SDWebImage/SDWebImage#2924

…otocol implementation still create CGContext, this can reduce RAM usage
@dreampiggy dreampiggy requested a review from kinarobin January 7, 2020 06:58
@dreampiggy dreampiggy merged commit 3e2d252 into master Jan 7, 2020
@dreampiggy dreampiggy deleted the fix_static_webp_cgcontext_RAM branch January 7, 2020 08:20
Almouro added a commit to Almouro/react-native-fast-image that referenced this pull request Feb 6, 2020
This improves RAM usage for static webp assets (see SDWebImage/SDWebImageWebPCoder#30)

Potentially related to DylanVann#622
DylanVann pushed a commit to DylanVann/react-native-fast-image that referenced this pull request Mar 14, 2020
This improves RAM usage for static webp assets see:
SDWebImage/SDWebImageWebPCoder#30

Potentially related to #622
connoremma pushed a commit to gametimesf/react-native-fast-image that referenced this pull request May 11, 2020
This improves RAM usage for static webp assets see:
SDWebImage/SDWebImageWebPCoder#30

Potentially related to DylanVann#622
alicayan008 pushed a commit to alicayan008/ReactNative-fast-image that referenced this pull request Jul 4, 2023
This improves RAM usage for static webp assets see:
SDWebImage/SDWebImageWebPCoder#30

Potentially related to DylanVann/react-native-fast-image#622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant