Open jpdillingham opened 1 year ago
I should note that performance is actually very good considering the amount of work being done here, and it's pretty rare for me to get this many children, so this is by no means a pressing issue for me or anyone else, but it's still worth a look.
I've been watching slskd metrics after upgrading to .NET 7, and one thing that is really jumping out at me is the correlation between garbage collection frequency, CPU utilization, and the number of distributed children:
The broadcast logic accounts for 100% of this activity, since it is the only part of the library that scales with the number of distributed children. There isn't much to the code, either:
Take a look at this code, as well as the underlying
WriteAsync
method, to see if there are any opportunities to reduce CPU or memory overhead (without losing functionality)