revanced-patcher icon indicating copy to clipboard operation
revanced-patcher copied to clipboard

feat: auto-retry with single-threaded writer on OOM

Open Ushie opened this issue 8 months ago • 8 comments

Type

Functionality

Issue

When running on limited memory, it may not be enough to patch a specific app and ends up throwing an OOM as seen in https://github.com/ReVanced/revanced-patcher/issues/193

Feature

ReVanced Patcher handles the OOM and restarts with single thread at the appropriate step

Motivation

ReVanced Patcher supports both single and multi-threads, multi-threads are preferred at all times as the patching process will overall be faster

This moves the hassle from the end-user to ReVanced Patcher, hopefully for a seamless transition with a few additional logs to state what happened

Additional context

The reason I'm opening this in the ReVanced Patcher repository instead of ReVanced Library or expecting it to be done by the clients is that hopefully, ReVanced Patcher can restart ONLY the necessary section instead of having to start over from the beginning

Acknowledgements

  • [X] I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I filled out all of the requested information in this issue properly.

Ushie avatar Oct 10 '23 17:10 Ushie