> As Piotr explained, there is no need for threads--it could all be async! > In > the THttpConnectıonö we need a dynamıc array of requests and when they are > storedö we answer them one by one.
This is good for static pages located on the same device. Using multithreaded pipeline will drasticaly reduce overall execution time when talking about dynamic pages which - for example - involves querying a database or similar blocking resources (anything which is I/O bound will benefit). Let's take a simple example: Assumin a client sending two pipelined requests for dynamic page. Building a dynamic page require accessing a database located on a dedicated server, accessing a few static files and some processing to build the actual page. In a single threaded piplined operation, everything is done sequenced. In a multithreaded pipeline operation, while a multithreaded approach will have processing for one request while the other is waiting for is database or file access. Overall time is shorter, there is a better CPU usage. Without mention the time shortening if the server is a multiprocessor. Conclusion: as always, multithreading is not mandatory but _may_ help optimize overall performance. If badly used, it may also very well lower performance. And in any case it _will_ lower performance for a single request. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be