Akka.Streams: when using Context.Materializer
, encourage users to cache it into a backing property or field
#109
Labels
AK2000
API usage rules
Here's the issue - using an example from Phobos's test suite:
Each time we call
Context.Materializer()
this operation allocates a new group of stream materialization actors - which is not usually what the user intends. So generally, it's a good idea for performance / memory / stability reasons to encourage users to always cacheContext.Materalizer()
calls.Important Distinction
Worth nothing: you do not need to cache
ActorSystem.Materializer()
calls - these are already cached internally as part of akkadotnet/akka.net#6453The text was updated successfully, but these errors were encountered: