Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions indra/llcorehttp/examples/http_texture_load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,6 @@ int main(int argc, char** argv)
LLCore::HttpRequest::DEFAULT_POLICY_ID,
concurrency_limit,
NULL);
if (pipeline_depth)
{
LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_PIPELINING_DEPTH,
LLCore::HttpRequest::DEFAULT_POLICY_ID,
pipeline_depth,
NULL);
}
if (tracing)
{
LLCore::HttpRequest::setStaticPolicyOption(LLCore::HttpRequest::PO_TRACE,
Expand Down Expand Up @@ -392,8 +385,6 @@ void usage(std::ostream & out)
" Default: " << concurrency_limit << "\n"
" -H <limit> HTTP request highwater (requests fed to llcorehttp).\n"
" Range: [1..200] Default: " << highwater << "\n"
" -p <depth> If <depth> is positive, enables and sets pipelineing\n"
" depth on HTTP requests. Default: " << pipeline_depth << "\n"
" -t <level> If <level> is positive ([1..3]), enables and sets HTTP\n"
" tracing on HTTP requests. Default: " << tracing << "\n"
" -v Verbose mode. Issue some chatter while running\n"
Expand Down
11 changes: 0 additions & 11 deletions indra/newview/app_settings/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3511,17 +3511,6 @@
<key>Value</key>
<string />
</map>
<key>HttpPipelining</key>
<map>
<key>Comment</key>
<string>If true, viewer will attempt to pipeline HTTP requests.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>HttpRangeRequestsDisable</key>
<map>
<key>Comment</key>
Expand Down
71 changes: 13 additions & 58 deletions indra/newview/llappcorehttp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,58 +58,57 @@ static const struct
U32 mMin;
U32 mMax;
U32 mRate;
bool mPipelined;
std::string mKey;
const char * mUsage;
} init_data[LLAppCoreHttp::AP_COUNT] =
{
{ // AP_DEFAULT
8, 8, 8, 0, false,
8, 8, 8, 0,
"",
"other"
},
{ // AP_TEXTURE
8, 1, 12, 0, true,
8, 1, 12, 0,
"TextureFetchConcurrency",
"texture fetch"
},
{ // AP_MESH1
32, 1, 128, 0, false,
32, 1, 128, 0,
"MeshMaxConcurrentRequests",
"mesh fetch"
},
{ // AP_MESH2
8, 1, 32, 0, true,
8, 1, 32, 0,
"Mesh2MaxConcurrentRequests",
"mesh2 fetch"
},
{ // AP_LARGE_MESH
2, 1, 8, 0, false,
2, 1, 8, 0,
"",
"large mesh fetch"
},
{ // AP_UPLOADS
2, 1, 8, 0, false,
2, 1, 8, 0,
"",
"asset upload"
},
{ // AP_LONG_POLL
32, 32, 32, 0, false,
32, 32, 32, 0,
"",
"long poll"
},
{ // AP_INVENTORY
4, 1, 4, 0, false,
4, 1, 4, 0,
"",
"inventory"
},
{ // AP_MATERIALS
2, 1, 8, 0, false,
2, 1, 8, 0,
"RenderMaterials",
"material manager requests"
},
{ // AP_AGENT
2, 1, 32, 0, false,
2, 1, 32, 0,
"Agent",
"Agent requests"
}
Expand All @@ -121,17 +120,15 @@ static void ssl_verification_changed();

LLAppCoreHttp::HttpClass::HttpClass()
: mPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mConnLimit(0U),
mPipelined(false)
mConnLimit(0U)
{}


LLAppCoreHttp::LLAppCoreHttp()
: mRequest(NULL),
mStopHandle(LLCORE_HTTP_HANDLE_INVALID),
mStopRequested(0.0),
mStopped(false),
mPipelined(true)
mStopped(false)
{}


Expand Down Expand Up @@ -272,15 +269,6 @@ void LLAppCoreHttp::init()
<< LL_ENDL;
}

// Global pipelining setting
static const std::string http_pipelining("HttpPipelining");
if (gSavedSettings.controlExists(http_pipelining))
{
// Default to true (in ctor) if absent.
mPipelined = gSavedSettings.getBOOL(http_pipelining);
LL_INFOS("Init") << "HTTP Pipelining " << (mPipelined ? "enabled" : "disabled") << "!" << LL_ENDL;
}

// Register signals for settings and state changes
for (int i(0); i < LL_ARRAY_SIZE(init_data); ++i)
{
Expand Down Expand Up @@ -373,7 +361,6 @@ void LLAppCoreHttp::cleanup()
mHttpClasses[i].mSettingsSignal.disconnect();
}
mSSLNoVerifySignal.disconnect();
mPipelinedSignal.disconnect();

delete mRequest;
mRequest = NULL;
Expand Down Expand Up @@ -419,38 +406,6 @@ void LLAppCoreHttp::refreshSettings(bool initial)

// Init- or run-time settings. Must use the queued request API.

// Pipelining changes
if (initial)
{
const bool to_pipeline(mPipelined && init_data[i].mPipelined);
if (to_pipeline != mHttpClasses[app_policy].mPipelined)
{
// Pipeline election changing, set dynamic option via request

LLCore::HttpHandle handle;
const long new_depth(to_pipeline ? PIPELINING_DEPTH : 0);

handle = mRequest->setPolicyOption(LLCore::HttpRequest::PO_PIPELINING_DEPTH,
mHttpClasses[app_policy].mPolicy,
new_depth,
LLCore::HttpHandler::ptr_t());
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
status = mRequest->getStatus();
LL_WARNS("Init") << "Unable to set " << init_data[i].mUsage
<< " pipelining. Reason: " << status.toString()
<< LL_ENDL;
}
else
{
LL_DEBUGS("Init") << "Changed " << init_data[i].mUsage
<< " pipelining. New value: " << new_depth
<< LL_ENDL;
mHttpClasses[app_policy].mPipelined = to_pipeline;
}
}
}

// Get target connection concurrency value
U32 setting(init_data[i].mDefault);
if (! init_data[i].mKey.empty() && gSavedSettings.controlExists(init_data[i].mKey))
Expand Down Expand Up @@ -482,7 +437,7 @@ void LLAppCoreHttp::refreshSettings(bool initial)
LLCore::HttpHandle handle;
handle = mRequest->setPolicyOption(LLCore::HttpRequest::PO_CONNECTION_LIMIT,
mHttpClasses[app_policy].mPolicy,
(mHttpClasses[app_policy].mPipelined ? 2 * setting : setting),
setting,
LLCore::HttpHandler::ptr_t());
if (LLCORE_HTTP_HANDLE_INVALID == handle)
{
Expand Down
9 changes: 0 additions & 9 deletions indra/newview/llappcorehttp.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,6 @@ class LLAppCoreHttp : public LLCore::HttpHandler
return mHttpClasses[policy].mPolicy;
}

// Return whether a policy is using pipelined operations.
bool isPipelined(EAppPolicy policy) const
{
return mHttpClasses[policy].mPipelined;
}

// Apply initial or new settings from the environment.
void refreshSettings(bool initial);

Expand All @@ -245,7 +239,6 @@ class LLAppCoreHttp : public LLCore::HttpHandler
public:
policy_t mPolicy; // Policy class id for the class
U32 mConnLimit;
bool mPipelined;
boost::signals2::connection mSettingsSignal; // Signal to global setting that affect this class (if any)
};

Expand All @@ -254,8 +247,6 @@ class LLAppCoreHttp : public LLCore::HttpHandler
F64 mStopRequested;
bool mStopped;
HttpClass mHttpClasses[AP_COUNT];
bool mPipelined; // Global setting
boost::signals2::connection mPipelinedSignal; // Signal for 'HttpPipelining' setting
boost::signals2::connection mSSLNoVerifySignal; // Signal for 'NoVerifySSLCert' setting

static LLCore::HttpStatus sslVerify(const std::string &uri, const LLCore::HttpHandler::ptr_t &handler, void *appdata);
Expand Down
4 changes: 1 addition & 3 deletions indra/newview/llmeshrepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3848,9 +3848,7 @@ void LLMeshRepository::notifyLoadedMeshes()
// we'll increase this. See llappcorehttp and llcorehttp for
// discussion on connection strategies.
LLAppCoreHttp & app_core_http(LLAppViewer::instance()->getAppCoreHttp());
S32 scale(app_core_http.isPipelined(LLAppCoreHttp::AP_MESH2)
? (2 * LLAppCoreHttp::PIPELINING_DEPTH)
: 5);
S32 scale(5);

static LLCachedControl<U32> mesh2_max_req(gSavedSettings, "Mesh2MaxConcurrentRequests");
LLMeshRepoThread::sMaxConcurrentRequests = mesh2_max_req;
Expand Down
12 changes: 2 additions & 10 deletions indra/newview/lltexturefetch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2906,16 +2906,8 @@ void LLTextureFetch::commonUpdate()
// Update low/high water levels based on pipelining. We pick
// up setting eventually, so the semaphore/request level can
// fall outside the [0..HIGH_WATER] range. Expect that.
if (LLAppViewer::instance()->getAppCoreHttp().isPipelined(LLAppCoreHttp::AP_TEXTURE))
{
mHttpHighWater = HTTP_PIPE_REQUESTS_HIGH_WATER;
mHttpLowWater = HTTP_PIPE_REQUESTS_LOW_WATER;
}
else
{
mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER;
mHttpLowWater = HTTP_NONPIPE_REQUESTS_LOW_WATER;
}
mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER;
mHttpLowWater = HTTP_NONPIPE_REQUESTS_LOW_WATER;

// Release waiters
releaseHttpWaiters();
Expand Down
Loading