ReVanced / revanced-patcher

💉 ReVanced Patcher used to patch Android applications
https://revanced.app
GNU General Public License v3.0
2.6k stars 211 forks source link

fix: Merge extension only when patch executes #315

Closed oSumAtrIX closed 1 month ago

oSumAtrIX commented 1 month ago

This PR changes how extensions are merged. Before, all extensions were merged unconditionally regardless of whether a patch succeeded. This was done to reduce memory overhead since the lookup map for the merge could be removed after all extensions were merged. Now, an extension of a patch is merged right before the patch is executed. This requires the lookup map to be kept in memory as long as the patches are executing. This should not be much of a problem. The maps are cleared after all patches were executed