Page MenuHome GnuPG

Use iobuf_copy where instead of manual iobuf_get/iobuf_put or iobuf_read/iobuf_write loops
Closed, ResolvedPublic

Description

There is few places where iobuf_get/iobuf_put or iobuf_read/iobuf_write loops loops are used while there's iobuf_copy which could be used instead for better performance and code deduplication/cleanup.

Here's two patches to change to use iobuf_copy instead of manual copy loops:


First patch change '--dearmor' and '--enarmor' to use iobuf_copy. Dearmor sees 3x speed increase and enarmor 3.5x on AMD Ryzen 5800x. Second patch changes '--no-literal' code path to use iobuf_copy and is more for refactoring/deduplication.