From b7aa064631a1aa7e12738895f4e7d5d5c957af84 Mon Sep 17 00:00:00 2001 From: Yoav Sternberg Date: Tue, 6 Apr 2021 21:13:21 +0300 Subject: [PATCH] :zap: Improve performance of GetterSetterUtils --- src/main/kotlin/com/yoavst/jeb/utils/GetterSetterUtils.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/kotlin/com/yoavst/jeb/utils/GetterSetterUtils.kt b/src/main/kotlin/com/yoavst/jeb/utils/GetterSetterUtils.kt index 181a093..362d20f 100644 --- a/src/main/kotlin/com/yoavst/jeb/utils/GetterSetterUtils.kt +++ b/src/main/kotlin/com/yoavst/jeb/utils/GetterSetterUtils.kt @@ -27,6 +27,9 @@ fun propagateRenameToGetterAndSetters( for (cls in classes) { logger.trace("Processing for getters/setters: ${cls.currentName}") for (method in cls.methods) { + // Getter / setter should have a verify minimal bytecode, with less than 10 instructions. + if (method.data.codeItem.instructions.size > 10) + continue val decompiledMethod = decompiler.decompileDexMethod(method) ?: continue processPossibleGetterSetter(method, decompiledMethod, cls, renameEngine, useOnlyModified) }