diff options
author | Loïc Hoguin <[email protected]> | 2012-09-26 14:11:53 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-09-26 14:20:29 +0200 |
commit | b2243aa54438dbea4137960c9dc6f54ac746f429 (patch) | |
tree | b7f3768cc6fea9bcc9d4363012a6cdf149178977 /examples | |
parent | bfab8d4b22d858e7cffa97d04210a62fae56681c (diff) | |
download | cowboy-b2243aa54438dbea4137960c9dc6f54ac746f429.tar.gz cowboy-b2243aa54438dbea4137960c9dc6f54ac746f429.tar.bz2 cowboy-b2243aa54438dbea4137960c9dc6f54ac746f429.zip |
Optimize cowboy_protocol
* #state{} changes are avoided where possible
* #state{} is now smaller and use less memory
* the Req object is created only after the whole request is parsed
* parsing makes use of a single binary match context
* external calls are avoided in the critical path
* URL fragment is now extracted properly (retrieval API next commit)
* argument orders to local functions modified to avoid extra operations
* dispatching waits as long as possible before tokenizing host/path
* handler opts are no longer shown in the error messages except in init
The code may not look as beautiful as it was before. But it really
is, for parsing code. The parsing section of the file may be skipped
if your eyes start to burn.
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions