0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.HLE/HOS
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
..
Applets Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01:00
Diagnostics/Demangler Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
Ipc Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
Kernel Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
Services Reducing Memory Allocations 202303 (#4624) 2023-04-24 02:06:23 +00:00
SystemState make UI display correct content in Chinese (#4155) 2022-12-21 17:20:37 -03:00
Tamper Make structs readonly when applicable (#4002) 2022-12-05 14:47:39 +01:00
ArmProcessContext.cs Make PPTC state non-static (#4157) 2023-01-05 00:01:44 +01:00
ArmProcessContextFactory.cs Initial Apple Hypervisor based CPU emulation (#4332) 2023-01-29 08:37:52 -03:00
HomebrewRomFsStream.cs Misc cleanup (#708) 2019-07-02 04:39:22 +02:00
Horizon.cs HLE: Refactoring of ApplicationLoader (#4480) 2023-03-31 21:16:46 +02:00
IdDictionary.cs Implement GPU syncpoints (#980) 2020-04-19 11:25:57 +10:00
LibHacHorizonManager.cs Update to LibHac 0.17.0 (#3878) 2022-11-23 18:32:35 +01:00
ModLoader.cs HLE: Refactoring of ApplicationLoader (#4480) 2023-03-31 21:16:46 +02:00
ResultCode.cs Refactoring result codes (#731) 2019-07-14 16:04:38 -03:00
ServiceCtx.cs hos: Cleanup the project (#2634) 2021-09-15 01:24:49 +02:00
TamperMachine.cs Removed unused usings. (#3593) 2022-08-18 18:04:54 +02:00
UserChannelPersistence.cs Fix exiting emulator with multi programs (#1590) 2020-10-10 00:52:11 +02:00