InDesign problem With Https cURL Seems Very Slow at first time to handshaking to server
i trying connect server using curl indesign, when trying call server, indesign takes time open , initialize socket. takes 25 seconds @ first time only, on subsequent calls fast.
*but when tried same programe c++ empty project fast. in 2 second result back,
*so problem indesign socket initialization using https @ first time because have tried same curl on simple c++ program , fast @ calls
specification:
i using
indesign cs7 version 9.0(build 143)
visual studio 2010
can tell me solution,
* url contains https://.......... (you can use google's https url testing)
** have tested program using http curl , seems faster on indesign.
so think problem https connection using indesign socket. makes heavy handshaking web server
my code snippet follows please try find if knows better.
i put code while initializing dialog fields,
if(curl) {
char error[1024];
curl_easy_setopt(curl, curlopt_debugdata, &config);
curl_easy_setopt(curl, curlopt_verbose, true);
curl_easy_setopt(curl, curlopt_url, url.c_str());
curl_easy_setopt(curl, curlopt_useragent, "mozilla/4.0 (compatible; msie 5.02; windows nt 5.0)");
curl_easy_setopt(curl, curlopt_header, false);
curl_easy_setopt(curl, curlopt_ssl_verifypeer, false);
curl_easy_setopt(curl, curlopt_ssl_verifyhost, 0l);
curl_easy_setopt(curl, curlopt_errorbuffer, error);
curl_easy_setopt(curl, curlopt_writefunction, &appwritememorycallback);
curl_easy_setopt(curl, curlopt_writedata, (void *)&chunk1);
curl_easy_setopt(curl, curlopt_httpheader, chunk);
//heres performance down around 25 seconds when calling server using curl object having
//https url
res = curl_easy_perform(curl);
// till here
if(curle_ok != res)
{
if(chunk1.memory)
{
free(chunk1.memory);
}
curl_easy_cleanup(curl);
return 0;
}
curl_easy_cleanup(curl);
}
please try find key issue why performance bad using https.
thanks,
cs7-based questions should posted in pre-release forums.
More discussions in InDesign SDK
adobe
Comments
Post a Comment