ryujinx-mirror/Ryujinx.HLE
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
..
Exceptions Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
FileSystem HLE: Refactoring of ApplicationLoader (#4480) 2023-03-31 21:16:46 +02:00
HOS Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
Loaders HLE: Deal with empty title names properly (#4643) 2023-04-12 01:09:47 +00:00
Ui Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
Utilities Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
AssemblyInfo.cs Prevent raw Unicode control codes from showing on software keyboard applet. (#3845) 2022-11-16 23:53:17 +01:00
HLEConfiguration.cs [GUI] Add network interface dropdown (#4597) 2023-04-16 15:25:20 +00:00
Homebrew.npdm Better process implementation (#491) 2018-11-28 20:18:09 -02:00
MemoryConfiguration.cs Update units of memory from decimal to binary prefixes (#3716) 2022-11-16 23:27:42 +01:00
PerformanceStatistics.cs Adjustments to framerate metric and addition of frametime (#2638) 2021-09-15 02:26:10 +02:00
Ryujinx.HLE.csproj IPC refactor part 3+4: New server HIPC message processor (#4188) 2023-01-04 23:15:45 +01:00
Switch.cs HLE: Refactoring of ApplicationLoader (#4480) 2023-03-31 21:16:46 +02:00