mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
* Add allocation test for adding multiple handlers Motivation: I believe there is at least 1 avoidable allocation in this area. Even if there isn't, making sure we don't increase allocations is good. Modifications: Add a test of allocations when adding multiple handlers. Set limits for docker images. Result: Allocations when adding multiple handlers are now checked. * Remove an allocation from addHandlers Motivation: Fewer allocations should improve performance. Modifications: Split out a sub function from addHandlers. I originally thought I'd have to change the part of this function which reads `var handlers = handlers` as there was a surprising allocation at the beginning of this function. It seems that breaking out some of the logic is sufficient to remove an allocation. Result: 1 fewer allocation. * Fix up alloc tests.