0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 05:45:47 +00:00
Ryujinx/Ryujinx.Common
jhorv 5131b71437
Reducing memory allocations (#4537)
* add RecyclableMemoryStream dependency and MemoryStreamManager

* organize BinaryReader/BinaryWriter extensions

* add StreamExtensions to reduce need for BinaryWriter

* simple replacments of MemoryStream with RecyclableMemoryStream

* add write ReadOnlySequence<byte> support to IVirtualMemoryManager

* avoid 0-length array creation

* rework IpcMessage and related types to greatly reduce memory allocation by using RecylableMemoryStream, keeping streams around longer, avoiding their creation when possible, and avoiding creation of BinaryReader and BinaryWriter when possible

* reduce LINQ-induced memory allocations with custom methods to query KPriorityQueue

* use RecyclableMemoryStream in StreamUtils, and use StreamUtils in EmbeddedResources

* add constants for nanosecond/millisecond conversions

* code formatting

* XML doc adjustments

* fix: StreamExtension.WriteByte not writing non-zero values for lengths <= 16

* XML Doc improvements. Implement StreamExtensions.WriteByte() block writes for large-enough count values.

* add copyless path for StreamExtension.Write(ReadOnlySpan<int>)

* add default implementation of IVirtualMemoryManager.Write(ulong, ReadOnlySequence<byte>); remove previous explicit implementations

* code style fixes

* remove LINQ completely from KScheduler/KPriorityQueue by implementing a custom struct-based enumerator
2023-03-17 13:14:50 +01:00
..
Collections Use new ArgumentNullException and ObjectDisposedException throw-helper API (#4163) 2022-12-27 20:27:11 +01:00
Configuration Add Support for Post Processing Effects (#3616) 2023-02-27 18:11:55 -03: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 Logging: Redirect StdErr into logging system (#4427) 2023-02-25 15:07:23 +00:00
Memory Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01: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 Minor code formatting (#4498) 2023-03-04 14:43:08 +01:00
Utilities Reducing memory allocations (#4537) 2023-03-17 13:14:50 +01: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