Reduce heap usage: page large beneficiary lists and stop loading images with list queries

XMLWordPrintable

    • Type: Task
    • Resolution: Done
    • Priority: Low
    • 2.14
    • Affects Version/s: None
    • None
    • FLW Sprint 54, FLW Sprint 55
    • FLW Mobile App
    • UAT

      • Beneficiary list queries in BenDao load whole lists into memory (66 list queries), and Paging is used in only 4 places.
      • Images are stored as base64 text in Room (image1 / image2 in AHD, VHNC, VHND and PHC Review). Every list query loads them, even when they aren't shown.
      • android:largeHeap="true" in the manifest hides memory problems.

      Scope:

      • Move the largest lists (All Beneficiaries, Household, EC/PW/Child) to Paging 3.
      • Change list-screen queries so they don't load image columns.
      • Phase 2, needs backend agreement: store images as files with a path in Room, and convert to base64 only at sync time.
      • After the above, remove largeHeap and verify on a 2–3 GB device with a large ward.

      Acceptance Criteria:

      • [ ] Memory stays flat while scrolling a list of 5,000+ beneficiaries.
      • [ ] No out-of-memory crashes on low-end devices without largeHeap.

              Assignee:
              Ishwar Chouhan
              Reporter:
              Nikhil Ananda Fegade
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: