Ryujinx/Ryujinx.Common
jhorv 666e05f5cb
Reducing Memory Allocations 202303 (#4624)
* use ArrayPool, avoid 6000-7000 allocs/sec of runtime

* use ArrayPool, avoid ~7k allocs/second during game execution

* use ArrayPool, avoid ~3000 allocs/sec during game execution

* use MemoryPool, reduce 0.5 MB/sec of new allocations during game execution

* avoid over-allocation by setting List<> Capacity when known

* remove LINQ in KTimeManager.UnscheduleFutureInvocation

* KTimeManager - avoid spinning one more time when the time has arrived

* KTimeManager - let SpinWait decide when to Thread.Yield(), and don't SpinOnce() immediately after Thread.Yield()

* use MemoryPool, reduce ~175k bytes/sec allocation during game execution

* IpcService - call commands via dynamic methods instead of reflection .Invoke(). Faster to call and with fewer allocations because parameters can be passed directly instead of as an array

* Make ButtonMappingEntry a record struct to avoid allocations. Set the List<ButtonMappingEntry> capacity according to use.

* add MemoryBuffer type for working with MemoryPool<byte>

* update changes to use MemoryBuffer

* make parameter ReadOnlySpan instead of Span

* whitespace fix

* Revert "IpcService - call commands via dynamic methods instead of reflection .Invoke(). Faster to call and with fewer allocations because parameters can be passed directly instead of as an array"

This reverts commit f2c698bdf65f049e8481c9f2ec7138d9b9a8261d.

* tweak KTimeManager spin behavior

* replace MemoryBuffer with ByteMemoryPool modeled after System.Buffers.ArrayMemoryPool<T>

* make ByteMemoryPoolBuffer responsible for renting memory
2023-04-24 02:06:23 +00:00
..
Collections Use new ArgumentNullException and ObjectDisposedException throw-helper API (#4163) 2022-12-27 20:27:11 +01:00
Configuration Fix missing string enum converters for the config (#4634) 2023-04-03 15:37:27 +02:00
Extensions Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
GraphicsDriver Replace DllImport usage with LibraryImport (#4084) 2022-12-15 18:07:31 +01:00
Logging Source generated json serializers (#4582) 2023-04-03 10:14:19 +00:00
Memory Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
Pools Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
SystemInfo Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
SystemInterop Fix Linux hang on shutdown (#4617) 2023-03-30 22:07:07 +02:00
Utilities [GUI] Add network interface dropdown (#4597) 2023-04-16 15:25:20 +00:00
AsyncWorkQueue.cs New NVDEC and VIC implementation (#1384) 2020-07-12 05:07:01 +02:00
Hash128.cs Add support for HLE macros and accelerate MultiDrawElementsIndirectCount #2 (#2557) 2021-08-26 23:50:28 +02:00
PerformanceCounter.cs Rewrite scheduler context switch code (#1786) 2020-12-09 19:20:05 -03:00
ReactiveObject.cs ReactiveObject: Handle case when oldValue is null (#3268) 2022-04-15 12:58:27 +02:00
ReferenceEqualityComparer.cs Only enumerate cached textures that are modified when flushing. (#918) 2020-02-07 08:49:26 +11:00
ReleaseInformation.cs misc: changes base application directory behaviour (#4460) 2023-02-21 22:38:34 +01:00
Ryujinx.Common.csproj Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
XXHash128.cs Use ReadOnlySpan<byte> compiler optimization for static data (#3130) 2022-02-17 21:38:50 +01:00