StragaSevera
05/19/2025, 6:54 AM+------------+-----------+-------------+--------------------------------------------------------------------+
| Total size | Instances | Largest | Class name |
+------------+-----------+-------------+--------------------------------------------------------------------+
| 2.02GiB | 19346752 | 112.00bytes | kotlinx.coroutines.ChildHandleNode |
| 1.54GiB | 18829802 | 88.00bytes | kotlinx.coroutines.NodeList |
| 1.19GiB | 9414895 | 136.00bytes | kotlinx.coroutines.JobSupport$ChildCompletion |
| 1.18GiB | 39507640 | 32.00bytes | kotlin.coroutines.CombinedContext |
| 1.09GiB | 14593270 | 80.00bytes | kotlinx.coroutines.StandaloneCoroutine |
| 938.18MiB | 10465478 | 94.00bytes | kotlinx.coroutines.internal.DispatchedContinuation |
| 742.92MiB | 5125080 | 152.00bytes | ___my_suspend_function__$append$2$1 |
| 529.53MiB | 4957649 | 112.00bytes | kotlinx.coroutines.ChildContinuation |
| 528.99MiB | 4333524 | 128.00bytes | ___my_suspend_function_2__$runLoop$2$3$1$1 |
| 514.25MiB | 4786174 | 267.04KiB | java.lang.Object[] |
| 460.03MiB | 5131677 | 94.00bytes | kotlinx.coroutines.CancellableContinuationImpl |
| 432.55MiB | 9449215 | 48.00bytes | kotlinx.coroutines.JobSupport$Finishing |
| 427.99MiB | 5099730 | 88.00bytes | kotlinx.coroutines.internal.ScopeCoroutine |
| 321.36MiB | 4680202 | 72.00bytes | kotlinx.coroutines.internal.ListClosed |
| 194.54MiB | 5099727 | 40.00bytes | kotlinx.coroutines.sync.MutexImpl$CancellableContinuationWithOwner |
The code is structured in a way that a Java library (Pcap4j) writes a lot of data in a normal Java queue, and then coroutine-aware code reads this pieces of data, processes them and passes along via channels (with both CPU-bound and IO-bound steps, each step has its own dispatcher with an independent executor).
Just from the bird's eye view, are there any obvious better approaches?Leo N
05/19/2025, 11:13 AMStragaSevera
05/19/2025, 11:14 AMLeo N
05/19/2025, 11:19 AM