diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-02-23 01:17:09 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-02-23 01:17:09 +0000 |
commit | 8757c6458e67e9ab20f9a049a9a68f51b3229816 (patch) | |
tree | 6e16f532118929644f3d238ca8e1115a583a9482 | |
parent | c81abd17fbbbb37c4df13771b485e139c8ab71d9 (diff) | |
download | cmogstored-8757c6458e67e9ab20f9a049a9a68f51b3229816.tar.gz |
cmogstored is pretty fast, but it could be faster.
-rw-r--r-- | http_get.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -36,7 +36,14 @@ static ssize_t linux_sendfile(int sockfd, int filefd, off_t *off, size_t count) #define ERR416 "416 Requested Range Not Satisfiable" -/* TODO: refactor this */ +/* + * TODO: refactor this + * + * snprintf() usage here is a hot spot in profiling. Perhaps one day, + * link-time optimization will be able to work on *printf() functions + * so we won't hurt code maintainability by optimizing away snprintf() + * ourselves. This function is ugly enough already + */ static off_t http_get_resp_hdr(struct mog_http *http, struct stat *sb) { char *modified; |