Skip to content

perf(patcher): Silence trace logs to fix GC thrashing and OOM#3287

Merged
secp192k1 merged 13 commits into
ReVanced:devfrom
secp192k1:fix/trace-performance
Apr 22, 2026
Merged

perf(patcher): Silence trace logs to fix GC thrashing and OOM#3287
secp192k1 merged 13 commits into
ReVanced:devfrom
secp192k1:fix/trace-performance

Conversation

@secp192k1

@secp192k1 secp192k1 commented Apr 7, 2026

Copy link
Copy Markdown
Member

The patcher generates millions of very detailed trace logs.
Previously, the manager was trying to process every single one of these, even though they weren't being shown to you. This created an flood of IPC packets and "GC Thrashing" (forcing the system to constantly clear out massive amounts of memory).
Thus making patching extra slow on low-end devices.

Silencing these logs makes patching significantly faster and can prevents an OutOfMemoryError exception.

Date Changes
26.04.12 Added an option in the settings under Advanced => Patcher => Minimum patcher log level
26.04.14 Updated pictures to match latest UI
image image

@secp192k1 secp192k1 marked this pull request as ready for review April 7, 2026 15:53
@secp192k1

Copy link
Copy Markdown
Member Author

Example below:

image

@Ushie Ushie requested a review from Axelen123 April 7, 2026 15:54
Comment thread app/src/main/java/app/revanced/manager/patcher/logger/Logger.kt Outdated
@secp192k1 secp192k1 requested a review from oSumAtrIX April 12, 2026 17:28
@oSumAtrIX

Copy link
Copy Markdown
Member

feature wise lgtm "Minimum patcher log level" could be renamed to "Minimum log level" since its in patcher group already

@oSumAtrIX

Copy link
Copy Markdown
Member

Need @Axelen123 approval too

Comment thread app/src/main/java/app/revanced/manager/patcher/runtime/process/Parameters.kt Outdated
Comment thread app/src/main/java/app/revanced/manager/patcher/worker/PatcherWorker.kt Outdated
@secp192k1 secp192k1 requested a review from Axelen123 April 14, 2026 14:29
Comment thread app/src/main/java/app/revanced/manager/patcher/logger/Logger.kt Outdated
Comment thread app/src/main/java/app/revanced/manager/ui/viewmodel/AdvancedSettingsViewModel.kt Outdated
@secp192k1 secp192k1 requested a review from Axelen123 April 18, 2026 12:12

@Axelen123 Axelen123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. You can squash after cleaning up the imports in AdvancedSettingsViewModel.kt.

Sorry for taking a while to review.

@secp192k1 secp192k1 merged commit ab4bdd3 into ReVanced:dev Apr 22, 2026
1 check failed
github-actions Bot pushed a commit that referenced this pull request Apr 22, 2026
# app [2.6.0-dev.12](v2.6.0-dev.11...v2.6.0-dev.12) (2026-04-22)

### Performance Improvements

* **patcher:** Silence trace logs to fix GC thrashing and OOM ([#3287](#3287)) ([ab4bdd3](ab4bdd3))
github-actions Bot pushed a commit that referenced this pull request Apr 26, 2026
# app [2.6.0](v2.5.1...v2.6.0) (2026-04-26)

### Bug Fixes

* Adjust font size and fix letter spacing in announcements ([e1660a7](e1660a7))
* BusError when running 32b binary on armv8 with compatibility ([#3279](#3279)) ([c1e1a82](c1e1a82))
* Dashboard padding ([5f757b6](5f757b6))
* Don't hide PatchOptions behind keyboard ([dd3d474](dd3d474))
* handle errors while loading sources ([b64dae2](b64dae2))
* Ignore RichTap vibrator hardware crash ([7856652](7856652))
* Missing database migration file [no ci] ([df9b44c](df9b44c))
* Paddings for AppScreen and PatchesScreen ([af3d0d7](af3d0d7))
* Preserve applied patches on patched apps when source patches is deleted ([#3227](#3227)) ([4884fdb](4884fdb))
* **Updater:** Handle session death ([#3249](#3249)) ([f1c56aa](f1c56aa))
* UpdateScreen padding ([e3c6d57](e3c6d57))

### Features

* Better styling for announcements ([4f88357](4f88357))
* enable Ackpine logging ([7cf28c0](7cf28c0))
* Improve AppsScreen design, add app pinning and jump to top ([#3240](#3240)) ([46720a4](46720a4))
* Improve patch options ([#3213](#3213)) ([90667c8](90667c8))

### Performance Improvements

* **patcher:** Silence trace logs to fix GC thrashing and OOM ([#3287](#3287)) ([ab4bdd3](ab4bdd3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants