Reducing the need to intern large tags

This commit is contained in:
Vitor Pamplona
2025-12-09 09:37:49 -05:00
parent f4a0cd5af3
commit d3fb507faa
@@ -26,7 +26,15 @@ class TagArrayManualDeserializer {
companion object {
fun fromJson(jsonObject: JsonNode): Array<Array<String>> =
jsonObject.toTypedArray {
it.toTypedArray { s -> if (s.isNull) "" else s.asText().intern() }
it.toTypedArray { s ->
if (s.isNull) {
""
} else {
val text = s.asText()
if (text.length < 100) text.intern()
text
}
}
}
}
}