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

Reply via email to