Repository navigation
Skip Glide's manifest parsing and respond to memory-pressure callbacks - #179
Merged
Merged
Conversation
Glide had no annotation-processor-generated AppGlideModule, so the first Glide.get() call (the first thumbnail load in Clean/Scan/ Convert, not app launch itself) fell back to scanning the manifest via PackageManager and reflection for legacy module declarations -- overhead with no purpose here, since none are declared. Add the glide-compiler annotation processor and an empty AppGlideModule with manifest parsing turned off, per Glide's own documented guidance. Also wire RedactApplication.onTrimMemory/onLowMemory through to Glide, so its memory cache and bitmap pool release proactively under system memory pressure instead of only shrinking once the process is killed outright. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KUuhuB3pkJmPUmtdpqPxJp
doubleangels
pushed a commit
that referenced
this pull request
Oct 5, 2026
main reverted PRs #178 and #179 (which dev still contains). Keeping dev's version re-lands that work together with this branch's changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195Wi7kaBCgyRx7BUL4zxVP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AppGlideModulewith manifest parsing turned off, so the firstGlide.get()call (the first thumbnail load in Clean/Scan/Convert) no longer falls back to scanning the manifest viaPackageManagerand reflection for legacy module declarations that don't exist in this app.RedactApplication.onTrimMemory/onLowMemorythrough to Glide, so its memory cache and bitmap pool release proactively under system memory pressure instead of only shrinking once the process is killed outright.Test plan
GeneratedAppGlideModule(first Glide call should no longer hit manifest parsing)adb shell am send-trim-memory) and confirm no crash🤖 Generated with Claude Code
https://claude.ai/code/session_01KUuhuB3pkJmPUmtdpqPxJp
Generated by Claude Code