osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Investigate array pool usage for VBOs and TextureUploads

Open peppy opened this issue 4 years ago • 2 comments

Currently we are using the ImageSharp MemoryAllocator to do all our array pool requests. It turns out that the default bucket sizes for the allocator we are using are quite small (6,16). We likely want to change to using ArrayPool directly, or adjust the sizes per use case.

Important ones are:

  • ArrayPoolTextureUpload (especially on the FrameTimeDisplay which requests thousands of these - may benefit from a local pool).
  • VertexBuffer, which can potentially hit the point of saturation and begin to allocate constantly.

peppy avatar Mar 01 '21 10:03 peppy

You might be interested in how the rewrite of o!f-xr handles the array pool: MemoryPool and an example usage

Flutterish avatar Jun 24 '22 02:06 Flutterish

I'm not sure how that example usage is of any relevance.

This issue can likely be closed. The first case is already refactored and the second will likely be covered by #5109.

peppy avatar Jun 24 '22 02:06 peppy