1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-19 01:16:40 +00:00
Ryujinx/Ryujinx.HLE/HOS/Services
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
..
Account Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Am Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Apm Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Arp HLE: Refactoring of ApplicationLoader (#4480) 2023-03-31 21:16:46 +02:00
Audio Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
Bcat Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Bgtc
Bluetooth Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
BluetoothManager Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Caps Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Cec
Ectx
Erpt
Es
Eupld
Fatal Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Friend Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Fs Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Grc
Hid Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Ins
Lbl Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Ldn Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Loader
Mig
Mii Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Mm Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Mnpp Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Ncm Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
News
Nfc Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Ngct Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Nifm [GUI] Add network interface dropdown (#4597) 2023-04-16 15:25:20 +00:00
Nim Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Notification
Npns
Ns Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Nv Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Olsc Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Ovln
Pcie
Pctl Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Pcv Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Pm Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Psc
Ptm Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Ro Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Sdb Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Settings Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Sm Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Sockets Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Spl Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Srepo
Ssl Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
SurfaceFlinger Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
Time Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Usb
Vi Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Wlan
CommandCmifAttribute.cs Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
CommandTIpcAttribute.cs
DisposableIpcService.cs Add dedicated ServerBase for FileSystem services (#3142) 2022-02-19 15:29:11 +01:00
DummyService.cs
IpcService.cs Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
ServerBase.cs Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
ServiceAttributes.cs