yep... that code is very bad sorry x(

approach of the model as the Web server was wrong, this cord deletes it now!

* * *

> Why not use Nim's asynhttpserver?

answer is simple.

because, i want to make fast web server. its just my **hobby**.

i think AsyncHTTPServer is a bit slow... ah, this does not mean that 
AsyncHTTPServer is bad.

when I create a web application I will use AsyncHTTPServer  that great web 
server tool.

i made a Web server with AsyncDispatcher alone to see the performance of 
AsyncDispatcher.

it was about 1.5 times faster than AsyncHTTPServer.

i have not seen all the internal code of AsyncHTTPServer, but I expected that 
the parser is probably a bottleneck.

assume that requests received from clients are temporarily saved in variables.

better parsers will not allocate memory in the process of parsing the request.

for example, like [picohttpparser](https://github.com/h2o/picohttpparser)

i needed such a fast parser to make a fast web server.

the resulting parser is this [mofuparser](https://github.com/2vg/mofuparser)

since it is zero copy, even when parsing 100, 000 times, the request parsing 
ends in about 0.05 seconds. (CPU: Intel core 2Duo T7700 2.40GHz 3 Core)

also, by using libuv to create multithreaded event loops, a web server with 
considerable performance was completed.

... talk is wrong

AsyncHTTPServer is not bad, rather a wonderful tool.

i dont know a lot about async, but i think the async of Nim will become better 
in future.

thank you for splendid language, Araq 

(sorry if wrong because im weak in English! ; _ ; )

Reply via email to