From d7974effdcbc7379fca08bd45afa705121895a30 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:40:53 +0200 Subject: [PATCH] refactor: Pre-size the class map --- src/main/kotlin/app/revanced/patcher/util/PatchClasses.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patcher/util/PatchClasses.kt b/src/main/kotlin/app/revanced/patcher/util/PatchClasses.kt index afcb8e0a..9e3043c8 100644 --- a/src/main/kotlin/app/revanced/patcher/util/PatchClasses.kt +++ b/src/main/kotlin/app/revanced/patcher/util/PatchClasses.kt @@ -18,7 +18,7 @@ class PatchClasses internal constructor( ) { internal constructor(set: Set) : - this(set.associateByTo(mutableMapOf()) { it.type }) + this(set.associateByTo(HashMap(set.size * 3 / 2)) { it.type }) internal fun addClass(classDef: ClassDef) { pool[classDef.type] = classDef