Enhance Profiler with pre-allocated sort buffers and frame management improvements

This commit is contained in:
max
2026-08-05 12:15:21 +02:00
parent 83f77d1ebe
commit 7853a768de
3 changed files with 135 additions and 57 deletions
+15
View File
@@ -78,6 +78,21 @@ public class BoundedQueue<T> : IEnumerable<T>, ICollection, IReadOnlyCollection<
}
}
// Iterates the internal Queue<T> directly (struct enumerator, no allocation) under the lock.
public int CopyTo(List<T> destination)
{
lock (syncLock)
{
destination.Clear();
foreach (T item in queue)
{
destination.Add(item);
}
return destination.Count;
}
}
public IEnumerator<T> GetEnumerator()
{
T[] snapshot;