Reduce maximum size of each static class

This helps improve IDE performance.
bzip2
Graham 5 years ago
parent e26778ffb0
commit 16d16b8efa
  1. 5
      deob/src/main/java/dev/openrs2/deob/transform/StaticScramblingTransformer.kt

@ -37,7 +37,7 @@ class StaticScramblingTransformer : Transformer() {
private fun nextClass(): Pair<ClassNode, MethodNode> { private fun nextClass(): Pair<ClassNode, MethodNode> {
var clazz = nextStaticClass var clazz = nextStaticClass
if (clazz != null && (clazz.fields.size + clazz.methods.size) < MAX_FIELDS_AND_METHODS) { if (clazz != null && clazz.fields.size < MAX_FIELDS && clazz.methods.size < MAX_METHODS) {
return Pair(clazz, nextClinit!!) return Pair(clazz, nextClinit!!)
} }
@ -197,6 +197,7 @@ class StaticScramblingTransformer : Transformer() {
companion object { companion object {
private val logger = InlineLogger() private val logger = InlineLogger()
private const val MAX_FIELDS_AND_METHODS = 500 private const val MAX_FIELDS = 500
private const val MAX_METHODS = 50
} }
} }

Loading…
Cancel
Save