1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-22 22:22:00 +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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
Ectx am/ectx: Implement SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled and add service placeholder (#2136) 2021-03-25 23:25:49 +01:00
Erpt Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
Es Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
Eupld Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
Hid Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Ins Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Add various error codes to Loader (#1208) 2020-05-04 13:22:28 +02:00
Mig Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
Npns Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
Pcie Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
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 Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
Vi Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
Wlan Refactoring HOS folder structure (#771) 2019-09-19 10:45:11 +10:00
CommandCmifAttribute.cs Rename Hipc to Cmif where appropriate (#3880) 2023-04-14 20:00:34 -03:00
CommandTIpcAttribute.cs Initial support for the new 12.x IPC system (#2182) 2021-04-14 00:01:24 +02:00
DisposableIpcService.cs Add dedicated ServerBase for FileSystem services (#3142) 2022-02-19 15:29:11 +01:00
DummyService.cs Refactoring commands handling (#728) 2019-07-11 22:13:43 -03:00
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 IPC refactor part 1: Use explicit separate threads to process requests (#1447) 2020-09-22 14:50:40 +10:00