Skip to content

Conversation

adalpari
Copy link
Contributor

Description

This PR is replacing this other one , and taking a more simplistic approach.
Instead of adding a retry mechanism with a fallback URL, it's just increasing the timeout when loading images with Glide.
Tests showed that complex images were taking from 5 to 10 secs to be processed at the server side, so the timeout has been set to 15 secs to be on the safe side.

Testing instructions

  1. Open the post in here: https://a8c.slack.com/archives/C08LE4U7FAM/p1757697088240459
  2. Open the first image
  • Verify the high-res of the image is loaded after some secs.

@adalpari adalpari requested a review from Copilot September 25, 2025 16:59
@adalpari adalpari marked this pull request as ready for review September 25, 2025 16:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Fixes a bug where large, complex images were timing out when loading in high resolution by increasing the Glide request timeout from the default to 15 seconds. The change addresses server-side processing delays of 5-10 seconds for complex images.

  • Increased Glide request timeout to 15 seconds to handle complex image processing
  • Applied timeout configuration using Volley's DefaultRetryPolicy

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dangermattic
Copy link
Collaborator

dangermattic commented Sep 25, 2025

2 Warnings
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@adalpari adalpari requested a review from jkmassel September 25, 2025 17:01
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 25, 2025

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr22235-189cfcd
Commit189cfcd
Direct Downloadjetpack-prototype-build-pr22235-189cfcd.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 25, 2025

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr22235-189cfcd
Commit189cfcd
Direct Downloadwordpress-prototype-build-pr22235-189cfcd.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Sep 25, 2025

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.88%. Comparing base (a97f897) to head (4bbb2f9).

Files with missing lines Patch % Lines
...ordpress/android/networking/GlideRequestFactory.kt 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #22235      +/-   ##
==========================================
- Coverage   39.89%   39.88%   -0.01%     
==========================================
  Files        2164     2164              
  Lines      102440   102450      +10     
  Branches    14756    14756              
==========================================
  Hits        40866    40866              
- Misses      58115    58125      +10     
  Partials     3459     3459              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adalpari adalpari changed the title Fix: CMM 754 bug when loading bog images in high res Fix: CMM-754 bug when loading bog images in high res Sep 25, 2025
): Request<ByteArray>? {
val httpsUrl: String = convertWPcomUrlToHttps(url)
return VolleyStreamFetcher.GlideRequest(httpsUrl, callback, priority, addAuthHeaders(url, headers))
return VolleyStreamFetcher.GlideRequest(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put a breakpoint here and viewed the post, but this was never called for me (and the high-res image never loaded).

I tried deleting the app and reinstalling then trying again, but the issue persists (so I don't think it's something to do with caching).

What would you suggest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's odd. They loaded for me after 4 and 6 secs 🤔

ReaderPhotoView image loaded successfully after 4349ms https://wpmobilep2.wordpress.com/wp-content/uploads/2025/09/frame-3.png?w=2400
ReaderPhotoView image loaded successfully after 6202ms https://wpmobilep2.wordpress.com/wp-content/uploads/2025/09/frame-4.png?w=2400

Copy link
Contributor Author

@adalpari adalpari Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added some debug logs. So, could you try it again and send me the trace back? Tag: "ReaderPhotoView"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These aren't getting called either, so I did some searching. reader photo fragment > newInstance is getting called, so I added similar logs to the top of all the lifecycle methods in that fragment, and it seems none of them are being called?

This is a rather old test device – could that be related?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd... What Android version are you running?
Maybe there's an exception to run a different flow for old versions

Copy link

@adalpari adalpari changed the title Fix: CMM-754 bug when loading bog images in high res Fix: CMM-754 bug when loading big images in high res Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants