playframework/playframework — pull request #1378 by jroper (2013-07-25 14:44:22+00:00)
Title: Raw BodyParser consumes too much memory.

Raw BodyParser stores the HTTP message body into ArrayBuffer[Byte] and each Byte consumes 17 bytes for only one byte of the body. As a result, BodyParser uses 17 times of memory. This causes **out of memory** if the client send a request which has a quite large entity.

Before fixing [issue 709](http://play.lighthouseapp.com/projects/82401-play-20/tickets/709-bodyparserof-maxlength-is-ignored), Raw BodyParser stores body which is larger than 100KB into a file, not memory. So it was not serious problem.

But now Raw BodyParser do that if only the body is larger than 2GB and actually it does not happen because max length cannot be larger than 2GB.