Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1367

Is the Typed StashBuffer capacity pre-allocated?

$
0
0

In Akka Typed, the StashBuffer has a maximum capacity. What is the reason for this? Will increasing the capacity decrease performance, independent of the number of elements actually in the buffer?

In other words, will a StashBuffer with a capacity of 100 be faster than a StashBuffer with capacity 100000 if both buffers contain the same number of elements (eg. 99 each)?

Sometimes I don’t care about the upper bound of the buffer (just like I don’t care about the .size of a Scala List) can I just set the capacity to max. then?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1367

Trending Articles