-
Notifications
You must be signed in to change notification settings - Fork 91
SDImageWebPCoder extremely slow #111
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
Comments
In history, the See my feedback radar to Apple:
I think you can re-test again, with the reproducable and standard sample (not just single cases) Or you can check my 4 years ago video: It's possible that Apple's Media team optimize for this case in iOS releases during the 4 years, but I haven't have time to test again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to use WebP format for animations instead of GIFs. However, I've noticed that SDImageWebPCoder is significantly slower, with a performance gap of tens of times compared to GIFs and the system decoder available on iOS 14.
Below are my test cases and their results. Since we still have a large user base on iOS versions below 14, could you please advise on whether SDImageWebPCoder can be optimized?
Test Case '-[image_Tests.ImagePerformanceTestCase testAWebpDecodingPerformance]' started.
webp图片大小380850
/Users/100010/test/.demo/features/test_ios/11.1.8/common/image_ios/Example/image/ImagePerformanceTestCase.swift:37: Test Case '-[image_Tests.ImagePerformanceTestCase testAWebpDecodingPerformance]' measured [Time, seconds] average: 0.034, relative standard deviation: 124.017%, values: [0.159663, 0.025849, 0.020243, 0.018986, 0.019030, 0.018984, 0.018927, 0.018926, 0.019007, 0.018933], performanceMetricID:com.apple.XCTPerformanceMetric_WallClockTime, baselineName: "", baselineAverage: , polarity: prefers smaller, maxPercentRegression: 10.000%, maxPercentRelativeStandardDeviation: 10.000%, maxRegression: 0.100, maxStandardDeviation: 0.100
Test Case '-[image_Tests.ImagePerformanceTestCase testAWebpDecodingPerformance]' passed (0.623 seconds).
Test Case '-[image_Tests.ImagePerformanceTestCase testGIFDecodingPerformance]' started.
gif图片大小890847
/Users/100010/test/.demo/features/test_ios/11.1.8/common/image_ios/Example/image/ImagePerformanceTestCase.swift:70: Test Case '-[image_Tests.ImagePerformanceTestCase testGIFDecodingPerformance]' measured [Time, seconds] average: 0.032, relative standard deviation: 41.455%, values: [0.071205, 0.030790, 0.027024, 0.027092, 0.027007, 0.027131, 0.027023, 0.026939, 0.026912, 0.026888], performanceMetricID:com.apple.XCTPerformanceMetric_WallClockTime, baselineName: "", baselineAverage: , polarity: prefers smaller, maxPercentRegression: 10.000%, maxPercentRelativeStandardDeviation: 10.000%, maxRegression: 0.100, maxStandardDeviation: 0.100
Test Case '-[image_Tests.ImagePerformanceTestCase testGIFDecodingPerformance]' passed (0.572 seconds).
Test Case '-[image_Tests.ImagePerformanceTestCase testWebPDecodingPerformance]' started.
webp图片大小380850
/Users/100010/test/.demo/features/test_ios/11.1.8/common/image_ios/Example/image/ImagePerformanceTestCase.swift:54: Test Case '-[image_Tests.ImagePerformanceTestCase testWebPDecodingPerformance]' measured [Time, seconds] average: 2.249, relative standard deviation: 1.178%, values: [2.328468, 2.235940, 2.237927, 2.241540, 2.241171, 2.239154, 2.238738, 2.246966, 2.241613, 2.242533], performanceMetricID:com.apple.XCTPerformanceMetric_WallClockTime, baselineName: "", baselineAverage: , polarity: prefers smaller, maxPercentRegression: 10.000%, maxPercentRelativeStandardDeviation: 10.000%, maxRegression: 0.100, maxStandardDeviation: 0.100
Test Case '-[image_Tests.ImagePerformanceTestCase testWebPDecodingPerformance]' passed (22.747 seconds).
Test Suite 'ImagePerformanceTestCase' passed at 2024-06-12 21:01:16.642.
Executed 3 tests, with 0 failures (0 unexpected) in 23.942 (23.942) seconds
Test Suite 'image_Tests.xctest' passed at 2024-06-12 21:01:16.643.
Executed 3 tests, with 0 failures (0 unexpected) in 23.942 (23.942) seconds
Test Suite 'Selected tests' passed at 2024-06-12 21:01:16.643.
Executed 3 tests, with 0 failures (0 unexpected) in 23.942 (23.943) seconds
The text was updated successfully, but these errors were encountered: