Akka Alpakka S3 connector slowness when using JsonFraming

I'm working with the Alpakka S3 connector to download a json file, parse it, do some processing, and then upload it back to S3 using the Alpakka S3 Sink.

In isolation the Source and Sink stages will read and subsequently write a mutli-million record file in about three seconds. Woot! But the simple addition of the JsonFraming stage causes a massive jump in the processing time of the file.

Here is the basic graph. doProcessing is something that will either return just the record it received or two versions of itself.

  .map { jsRecord =>

My question: is there anything I can do about this dramatic jump in processing time? I have another application, which uses the AWS SDK exclusively, that processes this file in about one minute. I would expect the Alpakka solution to be slower, but it takes almost three times longer than the non-Alpakka application.

To test this I've pretty much commented out my custom code, adding in stages after I've profiled the stream. Is there a better way to do this? Is there something to help identify what my stream is actually doing under the hood?