I am not expecting it to take less time, but to provide better throughput. With 1000 concurrent users, the sync version was still performing better (mean req/second).
Best regards, Behrang Saeedzadeh (Sent from my cellphone.) On Mon, 2 Dec. 2019, 8:44 am Mark Thomas, <ma...@apache.org> wrote: > On 01/12/2019 02:17, Behrang Saeedzadeh wrote: > > <snip/> > > > Any ideas what am I missing here? > > Async provides scalability, not raw performance. > > You haven't written a async file upload servlet. That would require > non-blocking I/O and look more like this: > > https://github.com/apache/tomcat/blob/master/webapps/examples/WEB-INF/classes/nonblocking/ByteCounter.java > > Step back from your code for a second. The async version does exactly > the same thing as the sync version apart from it does a bunch of *extra* > stuff (creating the Runnable and dispatching it to a different thread). > Why would you expect the code that does extra stuff, to take less time > when it does more? > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >