Skip to content

HippyDefaultImageProvider 图片处理时,会导致占用内存暴增, #4420

@loumzy

Description

@loumzy

期望结果

Image

这里的渲染方法,导致内存暴增,如果图片多一些,一个页面增加到 1~2G, 建议尽快优化
UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc]
initWithSize:theImage.size
format:[UIGraphicsImageRendererFormat preferredFormat]];
UIImage *prepared = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
[theImage drawAtPoint:CGPointZero];
}];

不加载图片时:引擎大约 50M, 内容在30~120M之间
Image

加载图片后基本都是在 1G以上,
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions