Hello, while evaluating Akka-Http I noticed a significant performance difference between normal and chunked encoding. It is the non-chunked case which is much slower. The difference are significant - 1minute vs 4 seconds for a 10MB message on same HW.
It seems the explanation is really small ByteString sizes of the request entity for the non-chunked case. My code needs to read the request content into a buffer, for which I am using StreamConverters, but for the investigation purposes I replaced this with an explicit code [1]. For chunked encoding the println statement logs numbers close to the chunk size used by the client e.q. for client using chunks of 1024B it says 1017. For normal transfer encoding however the message says anything between 1 and 9 bytes all the time, 1-3 most of the time. It seems wrong to use such small buffers. Can this perhaps be fixed by configuration? Thank you David [1] // req is the HttpRequest coming from the handler val read:Future[ByteArrayOutputStream] = req.entity.dataBytes.runFold(baos)((baos,d)=>{ val arr = d.toArray println(s"reading stream element of ${arr.length} bytes") baos.write(arr) baos }) -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.