Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#40 WinstoneInputStream performance problem?


I'm an experienced programmer, but unfortunately I don't know much about client/server communications, so forgive my attempt at explaining the problem.

The Winstone servlet is reading data streamed from the client and the stream is a GZipInputStream. In this case the servlet seems to process the data quite slowly (at least compared to Jetty or Tomcat). When I pause the execution in a debugger, it most often stops in WinstoneInputStream.read(). Now, maybe I'm not properly identifying the root cause of the problem, but there is definitely a performance problem somewhere.

Thanks for listening and thanks for a great (and very light!) servlet.


  • Upon further testing (and looking at the source code), I think I see the problem. I'm streaming a 300MB zip file to the server. While reading the stream, the "dump" data member in WinstoneInputStream grows and grows and I think it may cause a lot of garbage collection and, eventually, may even cause an OutOfMemory exception. It doesn't look like the dump data is ever even used.