about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-02-23 01:17:09 +0000
committerEric Wong <normalperson@yhbt.net>2013-02-23 01:17:09 +0000
commit8757c6458e67e9ab20f9a049a9a68f51b3229816 (patch)
tree6e16f532118929644f3d238ca8e1115a583a9482
parentc81abd17fbbbb37c4df13771b485e139c8ab71d9 (diff)
downloadcmogstored-8757c6458e67e9ab20f9a049a9a68f51b3229816.tar.gz
cmogstored is pretty fast, but it could be faster.
-rw-r--r--http_get.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/http_get.c b/http_get.c
index 2204508..a104b47 100644
--- a/http_get.c
+++ b/http_get.c
@@ -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;