Skip to content

Storage bloat while reading (in-place PNG conversion bypasses DiskLruCache limit & v9.9 reader storage) #147

Open

Description

@Svaerd

Brief summary

App storage (and HyperOS System files -> Other) bloats rapidly while reading and is only reclaimed when clearing all app data:

  1. In-place PNG overwrite bypasses DiskLruCache size limit (PageLoader.convertBimap):
    When SubsamplingScaleImageView fails with IOException (PageViewModel.onImageLoadError), PageLoader.convertBimap(uri) decodes the cached file and calls image.compressToPNG(file) directly on the file inside DiskLruCache (pages/). Re-encoding compressed images (e.g., AVIF/WebP) to lossless PNG inflates each page to several MB, while DiskLruCache still tracks the original put() byte size and never evicts past the 200 MB limit.
  2. Cache clear leaves stale DiskLruCache state & orphaned temp files:
    • DataCleanupSettingsViewModel.clearCache calls LocalStorageManager.clearCache (deleteRecursively()) without calling LocalStorageCache.clear(), leaving the singleton DiskLruCache journal stale in memory.
    • LocalStorageCache.createBufferFile writes <UUID>.<ext> into cacheDir.parentFile (outside pages/), so process death mid-download leaves orphaned temp files outside CacheDir.PAGES.
  3. v9.9 Novel Reader storage/DB churn:
    • NovelReaderActivity.setupWebView enables domStorageEnabled = true with default cacheMode and loads chapters with baseUrl = chapterUrl, accumulating Chromium data under app_webview/ (app data, only cleared by "Clear Data").
    • NovelReaderViewModel.updateScrollProgress calls historyRepository.addOrUpdate (ChaptersDao.replaceAll) on every unthrottled JS scroll event.

Steps to reproduce

  1. Read chapters in Futon v9.9.
  2. Observe filesystem / System files -> Other storage growing continuously across reading sessions (reaching ~106 GB).
  3. Clear all app data for Futon in Android Settings -> bloated storage immediately disappears.

Evidence

image
WhatsApp.Video.2026-11-19.at.20.41.36.mp4

Futon version

9.9

Android version

Android 16 (HyperOS 3.0.307.0.WNCCNXM.C11 | Android security update: 2026-08-01)

Device

Xiaomi 14

Acknowledgements

  • This is not a duplicate of an existing issue. Please look through the list of open issues before creating a new one.
  • This is not an issue with a specific manga source. Otherwise, you have to proceed from parsers repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions