Skip to content

ChannelPool: Investigate ways to dispatch channels as fast as possible #70

@martianboy

Description

@martianboy

ChannelPool.acquire() returns a promise that always resolves at least in the next tick due to how native Promises work.

One possible optimization is that if there are free channels in the pool, acquire returns one synchronously. This is probably most effective in conjunction with more optimizations in Broker.publish() to expect synchronous return value from pool.acquire() and return synchronously, releasing the channel in the same way as well.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestperformancePerformance optimizations

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions