[starter] Cleanup: make CachedStringSerializer private

GitOrigin-RevId: abb4906d5e6ce05b1b1f94775b9b10a524fa0145
This commit is contained in:
Maxim.Kolmakov
2024-08-23 13:36:47 +00:00
committed by intellij-monorepo-bot
parent 4d8303a99a
commit 00f06dad90
@@ -52,13 +52,13 @@ internal fun toSpanElement(span: SpanData): SpanElement {
)
}
val cache = ConcurrentHashMap<String, String>()
private val cache = ConcurrentHashMap<String, String>()
/**
* OT has a very verbose format with a lot of string duplication.
* Using cache, we can save about 30% of memory required to parse JSON.
*/
class CachedStringSerializer : KSerializer<String> {
private class CachedStringSerializer : KSerializer<String> {
private val delegate = String.serializer()
override val descriptor: SerialDescriptor = delegate.descriptor