Skip to content

Commit

Permalink
⚡ Improve performance of GetterSetterUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavst committed Apr 6, 2021
1 parent b8cd5fd commit b7aa064
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/com/yoavst/jeb/utils/GetterSetterUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b7aa064

Please sign in to comment.