Skip to content
Snippets Groups Projects
Commit f37b90df authored by Monty Brandenberg's avatar Monty Brandenberg
Browse files

SH-3222 Slow loading textures on Lag Me 1

Think I have found the major factor that causes the Linksys WRT54G V5 to
fall over in testing scenarios:  DNS.  For some historical reason, we're
trying to use libcurl without any DNS caching.  My implementation echoed
that and implemented it correctly and I was seeing a DNS request per request
on the wire.  The existing implementation tries to do that and has bugs
because it is clearing caching DNS data querying only once every few
seconds.  Once I started emulating the bug, comms through the WRT became
much, much more reliable.
parent adce3880
No related branches found
No related tags found
No related merge requests found
...@@ -77,6 +77,9 @@ const int LOOP_SLEEP_NORMAL_MS = 2; ...@@ -77,6 +77,9 @@ const int LOOP_SLEEP_NORMAL_MS = 2;
// Block allocation size (a tuning parameter) is found // Block allocation size (a tuning parameter) is found
// in bufferarray.h. // in bufferarray.h.
// Compatibility controls
const bool ENABLE_LINKSYS_WRT54G_V5_DNS_FIX = true;
} // end namespace LLCore } // end namespace LLCore
#endif // _LLCORE_HTTP_INTERNAL_H_ #endif // _LLCORE_HTTP_INTERNAL_H_
...@@ -385,8 +385,15 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) ...@@ -385,8 +385,15 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service)
curl_easy_setopt(mCurlHandle, CURLOPT_PRIVATE, this); curl_easy_setopt(mCurlHandle, CURLOPT_PRIVATE, this);
curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, "");
// *FIXME: Revisit this old DNS timeout setting - may no longer be valid if (ENABLE_LINKSYS_WRT54G_V5_DNS_FIX)
curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0); {
curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, 10);
}
else
{
// *FIXME: Revisit this old DNS timeout setting - may no longer be valid
curl_easy_setopt(mCurlHandle, CURLOPT_DNS_CACHE_TIMEOUT, 0);
}
curl_easy_setopt(mCurlHandle, CURLOPT_AUTOREFERER, 1); curl_easy_setopt(mCurlHandle, CURLOPT_AUTOREFERER, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(mCurlHandle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, DEFAULT_HTTP_REDIRECTS); // *FIXME: parameterize this later curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, DEFAULT_HTTP_REDIRECTS); // *FIXME: parameterize this later
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment