Skip to content

[Bug]: Buffers New Concepts Are Slow #226

@wallstop

Description

@wallstop

Description

The Buffers pool's own benchmarks show it failing massively — 119,752% over budget for list pooling (239,504ms vs 200ms target for 100K iterations). The PurgeTrigger.OnRent default makes it unsuitable for hot paths. If you want to improve the library:

Change the default trigger to PurgeTrigger.None or PurgeTrigger.Periodic — purging on every rent is pathological for high-frequency usage
Make the purge O(1) amortized — batch purge a fixed number of items per call instead of scanning all

Steps to Reproduce

Do a lot of buffered stuff

Expected Behavior

Super fast

Actual Behavior

Super slow

Severity

Major (feature broken, no workaround)

Unity Version

Unity 6.2 (6000.2)

Package Version

3.2.1

Platform

  • Editor
  • Windows
  • macOS
  • Linux
  • iOS
  • Android
  • WebGL
  • Other

Regression

  • Yes, this is a regression (worked in a previous version)

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions