]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Adam Piggott filed bug report #1740263
authorDaniel Stenberg <daniel@haxx.se>
Wed, 20 Jun 2007 21:57:28 +0000 (21:57 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 20 Jun 2007 21:57:28 +0000 (21:57 +0000)
(http://curl.haxx.se/bug/view.cgi?id=1740263). Adam discovered that when
getting a large amount of URLs with curl, they were fetched slower and
slower... which turned out to be because the --libcurl data collecting which
wrongly always was enabled, but no longer is...

CHANGES
RELEASE-NOTES
src/main.c

diff --git a/CHANGES b/CHANGES
index 1de71feb576ca81954f0f518e796fa68673b926e..18bdd01021c1166cfeb8d0136c59bdca8e0ecb1f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,13 @@
 
                                   Changelog
 
+Daniel S (20 June 2007)
+- Adam Piggott filed bug report #1740263
+  (http://curl.haxx.se/bug/view.cgi?id=1740263). Adam discovered that when
+  getting a large amount of URLs with curl, they were fetched slower and
+  slower... which turned out to be because the --libcurl data collecting which
+  wrongly always was enabled, but no longer is...
+
 Daniel S (18 June 2007)
 - Robson Braga Araujo filed bug report #1739100
   (http://curl.haxx.se/bug/view.cgi?id=1739100) that mentioned that libcurl
index b452628cc8e14d7ac34884b76620de5d8a8f08e2..21fa2b50685b80e9dc57a8a00d3fb4c20f5eb739 100644 (file)
@@ -59,6 +59,7 @@ This release includes the following bugfixes:
  o builds fine on 64bit HP-UX
  o multi interface HTTP CONNECT glitch
  o list FTP root directories when login dir is not root
+ o no longer slows down when getting very many URLs on the same command line
 
 This release includes the following known bugs:
 
@@ -85,6 +86,6 @@ advice from friends like these:
  Frank Hempel, Michael Wallner, Jeff Pohlmeyer, Tobias Rundström,
  Anders Gustafsson, James Bursa, Kristian Gunstone, Feng Tu,
  Andre Guibert de Bruet, Rob Crittenden, Rich Rauenzahn, Tom Regner,
- Dave Vasilevsky, Shmulik Regev, Robson Braga Araujo
+ Dave Vasilevsky, Shmulik Regev, Robson Braga Araujo, Adam Piggott
 
         Thanks! (and sorry if I forgot to mention someone)
index 9124747f2306fa2b069c000858a87b48e2887034..71616212654b4987a1adc12da731b53048ff40ad 100644 (file)
@@ -3354,13 +3354,15 @@ output_expected(const char* url, const char* uploadfile)
   return FALSE; /* non-HTTP upload, probably no output should be expected */
 }
 
-#define my_setopt(x,y,z) _my_setopt(x, #y, y, z)
+#define my_setopt(x,y,z) _my_setopt(x, config, #y, y, z)
 
 static struct curl_slist *easycode;
 
-CURLcode _my_setopt(CURL *curl, const char *name, CURLoption tag, ...);
+CURLcode _my_setopt(CURL *curl, struct Configurable *config, const char *name,
+                    CURLoption tag, ...);
 
-CURLcode _my_setopt(CURL *curl, const char *name, CURLoption tag, ...)
+CURLcode _my_setopt(CURL *curl, struct Configurable *config, const char *name,
+                    CURLoption tag, ...)
 {
   va_list arg;
   CURLcode ret;
@@ -3409,14 +3411,18 @@ CURLcode _my_setopt(CURL *curl, const char *name, CURLoption tag, ...)
     ret = curl_easy_setopt(curl, tag, oval);
   }
 
-  bufp = curl_maprintf("%scurl_easy_setopt(hnd, %s, %s);%s",
-                       remark?"/* ":"", name, value,
-                       remark?" [REMARK] */":"");
+  if(config->libcurl) {
+    /* we only use this for real if --libcurl was used */
 
-  if (!bufp || !curl_slist_append(easycode, bufp))
-    ret = CURLE_OUT_OF_MEMORY;
-  if (bufp)
-    curl_free(bufp);
+    bufp = curl_maprintf("%scurl_easy_setopt(hnd, %s, %s);%s",
+                         remark?"/* ":"", name, value,
+                         remark?" [REMARK] */":"");
+
+    if (!bufp || !curl_slist_append(easycode, bufp))
+      ret = CURLE_OUT_OF_MEMORY;
+    if (bufp)
+      curl_free(bufp);
+  }
   va_end(arg);
 
   return ret;