-
Notifications
You must be signed in to change notification settings - Fork 126
Description
Code Optimizations in Azure has identified a excessive Memory usage by the "PubnubApi.EndPoint.TelemetryManager.CleanupTelemetryData" method. It has 3 recommendations.
Recommendation 1:
Description: A lot of CPU or Memory is being spent in Enumerable.ToDictionary().
Current Condition: 19% of your Memory was spent in Enumerable.ToDictionary called from PubnubApi.EndPoint.TelemetryManager.CleanupTelemetryData. We expected this value to be <2%.
Recommendations: Verify that Enumerable.ToDictionary() isn't being called for a few look-ups in the resulting Dictionary<K, V>. This can instead be accomplished simply by enumerating over the Enumerable.
Recommendation 2:
**Description: ** Task.ScheduleAndStart is causing unusually high memory allocations.
Current Condition: 6% of your Memory was spent in Task.ScheduleAndStart called from PubnubApi.EndPoint.TelemetryManager.CleanupTelemetryData. We expected this value to be <1%.
Recommendations: Consider investigating why Task.ScheduleAndStart is causing higher than expected memory allocations.
Recommendation 3:
**Description: ** Excessive string concatenation is causing lots of allocations and CPU consumption.
Current Condition: 3% of your Memory was spent in String.Concat called from PubnubApi.EndPoint.TelemetryManager.CleanupTelemetryData. We expected this value to be <1%.
Recommendations: Consider using cheaper alternatives such as String.Join or a StringBuilder instead.