mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
[fleet] a bit of performance in tcp socket
- kotlinx.serialization on hot path costs 10_000 m/s - unconfined ServerRequestDispatcher give 3_000 more GitOrigin-RevId: 7d64ebd2d5603015283b19db74fe4c5835e95f96
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ea4c14fcaf
commit
2eb3e69abb
@@ -59,7 +59,7 @@ class ServerRequestDispatcher(private val connectionListener: ConnectionListener
|
||||
broadcastSafely(TransportMessage.RouteOpened(route))
|
||||
connectionListener?.onConnect(endpoint, route, socketId, presentableName)
|
||||
coroutineScope {
|
||||
val connectionJob = launch {
|
||||
val connectionJob = launch(Dispatchers.Unconfined) {
|
||||
receive.consumeEach { message ->
|
||||
when (message) {
|
||||
is TransportMessage.Envelope -> {
|
||||
|
||||
@@ -21,7 +21,7 @@ sealed class TransportMessage {
|
||||
|
||||
@Serializable
|
||||
@SerialName("envelope")
|
||||
data class Envelope(val destination: UID, val origin: UID, val otelData: String? = null, val payload: String) : TransportMessage()
|
||||
data class Envelope(val destination: UID, val origin: UID, val otelData: String? = null, val payload: String) : TransportMessage()
|
||||
|
||||
fun serialize(): String {
|
||||
return Json.encodeToString(serializer, this)
|
||||
|
||||
Reference in New Issue
Block a user