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

Increase Cursor Window Size to 20mb to load larger posts #20911

Merged
merged 1 commit into from
May 30, 2024

Conversation

thomashorta
Copy link
Contributor

@thomashorta thomashorta commented May 29, 2024

Fixes #18727

We had previously bumped the cursor size to 5Mb in FluxC (#18774 and wordpress-mobile/WordPress-FluxC-Android#2776) and have been using that default in release builds ever since, but it seems like that wasn't enough as we still see some users crashing due to Cursor Window Size.

Ideally our data should not be stored with such a big size per row, but taking care of that requires a deep analysis and refactor of a huge part of the app and data storage within it. So as a smaller effort for now, let's bump the Cursor Window Size to 20mb (which we already use for debug builds) and monitor if we see fewer crashes in release.

Note: it's possible that increasing the cursor size could lead to OOM issues, but 20mb shouldn't be enough to cause that. We should monitor OOMs as well.


To Test:

I wasn't able to find a way of reproducing this issue as it requires having a big post, though I was not able to generate a fake large post easily.


Regression Notes

  1. Potential unintended areas of impact

    • N/A
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • N/A
  3. What automated tests I added (or what prevented me from doing so)

    • N/A

PR Submission Checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • x ] I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@dangermattic
Copy link
Collaborator

dangermattic commented May 29, 2024

1 Warning
⚠️ Class WPWellSqlConfig is missing tests, but unit-tests-exemption label was set to ignore this.

Generated by 🚫 Danger

Copy link

sonarcloud bot commented May 29, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@wpmobilebot
Copy link
Contributor

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
Versionpr20911-a1f3c73
Commita1f3c73
Direct Downloadwordpress-prototype-build-pr20911-a1f3c73.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

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
Versionpr20911-a1f3c73
Commita1f3c73
Direct Downloadjetpack-prototype-build-pr20911-a1f3c73.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.95%. Comparing base (0254e9e) to head (a1f3c73).
Report is 2 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #20911      +/-   ##
==========================================
- Coverage   40.95%   40.95%   -0.01%     
==========================================
  Files        1516     1517       +1     
  Lines       69519    69523       +4     
  Branches    11467    11467              
==========================================
  Hits        28474    28474              
- Misses      38459    38463       +4     
  Partials     2586     2586              

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

Copy link
Contributor

@ravishanker ravishanker left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this. LGTM 🚀

@irfano irfano added this to the 25.1 milestone May 30, 2024
@irfano irfano merged commit 84df633 into trunk May 30, 2024
23 of 24 checks passed
@irfano irfano deleted the issue/18727-cursor-window-size branch May 30, 2024 06:12
@irfano irfano linked an issue May 30, 2024 that may be closed by this pull request
@irfano irfano mentioned this pull request May 30, 2024
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.

SQLiteBlobTooBigException: Row too big to fit into CursorWindow requiredPos=0, totalRows=1 Segfault Crash
5 participants