SDWebImage / SDWebImage/SDWebImageWebPCoder
Frames loading
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Objective-C
- Star
- 277
- Fork
- 101
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Hello, I'm trying to use animated webp images as cells for collection view and it works nice on new devices, but on devices like iPhone 7 I have such an issue: on first appearing of cell the loading of images is freezed, and scrolling is not (I can scroll the collection without freezes, so it is not main thread lock). There are approximately 50 cells of images, and they loads by frame. After some time (I guess when all frames of images are passed) all cells begin to animate correctly (after closing and reopening the screen too). Looks like it is something connected with caching. All webp-s are local files, so it is not network loading. Am doing something wrong? Here is the code:
SDWebImageManager.shared.optionsProcessor = SDWebImageOptionsProcessor { _, options, context in
var mutableOptions = options
mutableOptions.insert([.retryFailed, .highPriority/*, .preloadAllFrames*/]) // no efffect on frames loading
return SDWebImageOptionsResult(options: mutableOptions, context: context)
}
SDImageCodersManager.shared.addCoder(SDImageWebPCoder.shared)
SDWebImageDownloader.shared.setValue("image/webp,image/*,*/*;q=0.8", forHTTPHeaderField: "Accept")
...
var stickerImageView = SDAnimatedImageView(frame: .zero)
// stickerImageView.shouldIncrementalLoad = true // no efffect on frames loading
stickerImageView.sd_imageTransition = .fade(duration: 0.3)
...
stickerImageView.sd_setImage(with: url, placeholderImage: placeholder)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện trường hợp collection-view WebP động với SDAnimatedImageView, SDWebImageManager và SDImageCodersManager trên một thiết bị iOS cũ hơn hoặc môi trường tương đương. So sánh lần xuất hiện đầu tiên với hoạt ảnh về sau, sau khi các hình ảnh cục bộ đã được xử lý hoặc lưu vào bộ nhớ đệm. Hoàn thành khi khoảng 50 ô WebP động cục bộ bắt đầu tải và hoạt ảnh đúng cách mà không xảy ra hiện tượng đóng băng ban đầu đã được báo cáo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- ios, objective-c, swift
- Lĩnh vực
- mobile, performance
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100