Skip to content

DirectBufferProxy uses unnecessary concurrent queue for object pool #200

@danielcranford

Description

@danielcranford

Unnecessary since the queue object is thread local. poll() and offer() are likely more expensive than a simple ArrayDeque which is used in the ByteBufferProxy object pool implementation. Additionally, concurrent queue is fixed size meaning the offer() in DirectBufferProxy.deallocate() can fail abandoning the DirectBuffer to be garbage collected (though perhaps this is desired?) unlike the ArrayDeque used in ByteBufferProxy which resizes it's capacity when offer() is called while full.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions