Commit 6cc3293c28e1f669a21f8716d60e631804f45179
1 parent
328c516a
add some time measurement
Showing
1 changed file
with
9 additions
and
3 deletions
Show diff stats
calexium_lib/web/CXM_multihost_http_server.anubis
| @@ -165,6 +165,7 @@ | @@ -165,6 +165,7 @@ | ||
| 165 | read CXM_common.anubis | 165 | read CXM_common.anubis |
| 166 | read tools/basis.anubis | 166 | read tools/basis.anubis |
| 167 | read system/string.anubis | 167 | read system/string.anubis |
| 168 | +read system/files.anubis | ||
| 168 | read CXM_mime.anubis | 169 | read CXM_mime.anubis |
| 169 | 170 | ||
| 170 | 171 | ||
| @@ -2104,7 +2105,8 @@ define One | @@ -2104,7 +2105,8 @@ define One | ||
| 2104 | { | 2105 | { |
| 2105 | false then | 2106 | false then |
| 2106 | forget(reliable_write(connection,to_byte_array("HTTP/1.1 200 OK"+crlf))); | 2107 | forget(reliable_write(connection,to_byte_array("HTTP/1.1 200 OK"+crlf))); |
| 2107 | - forget(reliable_write(connection,[format_headers(headers + headers_for_send_file(mime_type, size, current_etag, mb_ftimes)) , crlf])); | 2108 | + forget(reliable_write(connection,[format_headers(headers + headers_for_send_file(mime_type, size, current_etag, mb_ftimes)) , crlf])); |
| 2109 | + //forget(copy_file_to_Connection(file, connection, size)), | ||
| 2108 | send_file_body(desc,connection,file,size,0,filename), | 2110 | send_file_body(desc,connection,file,size,0,filename), |
| 2109 | true then | 2111 | true then |
| 2110 | forget(reliable_write(connection,to_byte_array("HTTP/1.1 304 Not Modified"+crlf))); | 2112 | forget(reliable_write(connection,to_byte_array("HTTP/1.1 304 Not Modified"+crlf))); |
| @@ -2262,6 +2264,7 @@ define One | @@ -2262,6 +2264,7 @@ define One | ||
| 2262 | http_info(ip_addr,uri,headers,generate_tt), | 2264 | http_info(ip_addr,uri,headers,generate_tt), |
| 2263 | all_web_args, | 2265 | all_web_args, |
| 2264 | is_SSL(connection)), | 2266 | is_SSL(connection)), |
| 2267 | + print_delta("After page generation"); | ||
| 2265 | if answer_headers_body is (additional_headers,answer_body) then | 2268 | if answer_headers_body is (additional_headers,answer_body) then |
| 2266 | forget(reliable_write(connection, | 2269 | forget(reliable_write(connection, |
| 2267 | [ "HTTP/1.1 200 OK", crlf, | 2270 | [ "HTTP/1.1 200 OK", crlf, |
| @@ -2269,7 +2272,9 @@ define One | @@ -2269,7 +2272,9 @@ define One | ||
| 2269 | format_headers(standard_headers_for_html(length(answer_body),charset(desc))), | 2272 | format_headers(standard_headers_for_html(length(answer_body),charset(desc))), |
| 2270 | format_headers(additional_headers), | 2273 | format_headers(additional_headers), |
| 2271 | crlf . | 2274 | crlf . |
| 2272 | - answer_body]))) | 2275 | + answer_body])); |
| 2276 | + print_delta("After sending page") | ||
| 2277 | + ) | ||
| 2273 | else (send_file(desc, | 2278 | else (send_file(desc, |
| 2274 | connection, | 2279 | connection, |
| 2275 | uri, | 2280 | uri, |
| @@ -2280,7 +2285,8 @@ define One | @@ -2280,7 +2285,8 @@ define One | ||
| 2280 | not_found then failure, | 2285 | not_found then failure, |
| 2281 | found(v) then success(v) | 2286 | found(v) then success(v) |
| 2282 | }, | 2287 | }, |
| 2283 | - (One u) |-> before_send_file(desc)(all_web_args)))). | 2288 | + (One u) |-> before_send_file(desc)(all_web_args)); |
| 2289 | + print_delta("After sending file"))). | ||
| 2284 | 2290 | ||
| 2285 | 2291 | ||
| 2286 | 2292 |