Class SharedArrayPool<T>
Inheritance
SharedArrayPool<T>
Inherited Members
Namespace: PoeShared.Services
Assembly: PoeShared.dll
Syntax
public sealed class SharedArrayPool<T> : LazyReactiveObject<SharedArrayPool<T>>, IDisposable, INotifyPropertyChanged, IArrayPool<T>
Type Parameters
Name | Description |
---|---|
T |
Remarks
TlsOverPerCoreLockedStacksArrayPool max array size is only 1MB, meaning that it does not work for large arrays, which is reasonable considering it uses threadlocal to store data
- Using "large" pool does not really work due to trimming
- It makes sense to implement byte/char pool which will repurpose same memory buffers
- Implement custom array pool for large objects to avoid trimming issue (maybe one of these? https://github.com/epeshk/arraypool-examples/blob/master/ArrayPoolTests/BoundedConcurrentQueue.cs)
- Need thorough testing before doing anything as there are way too many nuances, for now Shared pool should work for most cases
- Reading 30mb of JSON is way too expensive, this must be addressed! Very high chance that without that problem every other change will not be needed
Constructors
Name | Description |
---|---|
SharedArrayPool() |
Methods
Name | Description |
---|---|
Rent(int) | |
Return(T[]) |