From cdd9a8e843302ae8aff203d16d3008f64107e378 Mon Sep 17 00:00:00 2001 From: AiraYumi Date: Fri, 8 Nov 2024 08:32:50 +0900 Subject: [PATCH] depclean http pipelining code --- .../llcorehttp/examples/http_texture_load.cpp | 9 --- indra/newview/app_settings/settings.xml | 11 --- indra/newview/llappcorehttp.cpp | 71 ++++--------------- indra/newview/llappcorehttp.h | 9 --- indra/newview/llmeshrepository.cpp | 4 +- indra/newview/lltexturefetch.cpp | 12 +--- 6 files changed, 16 insertions(+), 100 deletions(-) diff --git a/indra/llcorehttp/examples/http_texture_load.cpp b/indra/llcorehttp/examples/http_texture_load.cpp index 986e675d00e..1a68986b74e 100644 --- a/indra/llcorehttp/examples/http_texture_load.cpp +++ b/indra/llcorehttp/examples/http_texture_load.cpp @@ -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, @@ -392,8 +385,6 @@ void usage(std::ostream & out) " Default: " << concurrency_limit << "\n" " -H HTTP request highwater (requests fed to llcorehttp).\n" " Range: [1..200] Default: " << highwater << "\n" - " -p If is positive, enables and sets pipelineing\n" - " depth on HTTP requests. Default: " << pipeline_depth << "\n" " -t If 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" diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 129f593454d..9c4934263c0 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3511,17 +3511,6 @@ Value - HttpPipelining - - Comment - If true, viewer will attempt to pipeline HTTP requests. - Persist - 1 - Type - Boolean - Value - 1 - HttpRangeRequestsDisable Comment diff --git a/indra/newview/llappcorehttp.cpp b/indra/newview/llappcorehttp.cpp index f4f19906f13..dade117e89e 100644 --- a/indra/newview/llappcorehttp.cpp +++ b/indra/newview/llappcorehttp.cpp @@ -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" } @@ -121,8 +120,7 @@ static void ssl_verification_changed(); LLAppCoreHttp::HttpClass::HttpClass() : mPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID), - mConnLimit(0U), - mPipelined(false) + mConnLimit(0U) {} @@ -130,8 +128,7 @@ LLAppCoreHttp::LLAppCoreHttp() : mRequest(NULL), mStopHandle(LLCORE_HTTP_HANDLE_INVALID), mStopRequested(0.0), - mStopped(false), - mPipelined(true) + mStopped(false) {} @@ -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) { @@ -373,7 +361,6 @@ void LLAppCoreHttp::cleanup() mHttpClasses[i].mSettingsSignal.disconnect(); } mSSLNoVerifySignal.disconnect(); - mPipelinedSignal.disconnect(); delete mRequest; mRequest = NULL; @@ -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)) @@ -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) { diff --git a/indra/newview/llappcorehttp.h b/indra/newview/llappcorehttp.h index c02c4a532d3..b8e680b1cdc 100644 --- a/indra/newview/llappcorehttp.h +++ b/indra/newview/llappcorehttp.h @@ -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); @@ -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) }; @@ -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); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index e4e70b02f93..e6cd1cd1ace 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -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 mesh2_max_req(gSavedSettings, "Mesh2MaxConcurrentRequests"); LLMeshRepoThread::sMaxConcurrentRequests = mesh2_max_req; diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 7b6f591254e..6e26f736445 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -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();