diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index e949cbbb4..b36bd0b65 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -43,6 +43,7 @@ #include #include +#include "llfasttimer.h" #include "lltimer.h" #include "llstring.h" @@ -94,9 +95,11 @@ std::string LLDate::asRFC1123() const return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT")); } +LLFastTimer::DeclareTimer FT_DATE_FORMAT("Date Format"); std::string LLDate::toHTTPDateString (std::string fmt) const { + LLFastTimer ft1(FT_DATE_FORMAT); time_t locSeconds = (time_t) mSecondsSinceEpoch; struct tm * gmt = gmtime (&locSeconds); @@ -105,7 +108,7 @@ std::string LLDate::toHTTPDateString (std::string fmt) const std::string LLDate::toHTTPDateString (tm * gmt, std::string fmt) { - // Return Epoch UTC date + LLFastTimer ft1(FT_DATE_FORMAT); // avoid calling setlocale() unnecessarily - it's expensive. static std::string prev_locale = ""; diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 7cc29bac8..adad26591 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -34,6 +34,7 @@ #include "llinventory.h" #include "lldbstrings.h" +#include "llfasttimer.h" #include "llinventorydefines.h" #include "llxorcipher.h" #include "llsd.h" @@ -1055,8 +1056,11 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate; } +LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize"); + bool LLInventoryItem::fromLLSD(const LLSD& sd) { + LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE); mInventoryType = LLInventoryType::IT_NONE; mAssetUUID.setNull(); std::string w; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index ea8bbd009..cbeb0daa9 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -74,9 +74,6 @@ #include -LLFastTimer::DeclareTimer FTM_MESH_UPDATE("Mesh Update"); -LLFastTimer::DeclareTimer FTM_LOAD_MESH("Load Mesh"); - LLMeshRepository gMeshRepo; const U32 MAX_MESH_REQUESTS_PER_SECOND = 100; @@ -1259,8 +1256,7 @@ void LLMeshUploadThread::DecompRequest::completed() void LLMeshUploadThread::preStart() { //build map of LLModel refs to instances for callbacks - for (instance_list::iterator iter = mInstanceList.begin(); - iter != mInstanceList.end(); ++iter) + for (instance_list::iterator iter = mInstanceList.begin(); iter != mInstanceList.end(); ++iter) { mInstance[iter->mModel].push_back(*iter); } @@ -1603,9 +1599,6 @@ void LLMeshUploadThread::requestWholeModelFee() } #endif //MESH_IMPORT -//static LLFastTimer::DeclareTimer FTM_NOTIFY_MESH_LOADED("Notify Loaded"); -//static LLFastTimer::DeclareTimer FTM_NOTIFY_MESH_UNAVAILABLE("Notify Unavailable"); - void LLMeshRepoThread::notifyLoadedMeshes() {//called via gMeshRepo.notifyLoadedMeshes(). mMutex already locked while (!mLoadedQ.empty()) @@ -1718,8 +1711,7 @@ void LLMeshRepository::cacheOutgoingMesh(LLMeshUploadData& data, LLSD& header) { if (data.mModel[i].notNull()) { - LLPointer volume = new LLVolume(volume_params, - LLVolumeLODGroup::getVolumeScaleFromDetail(i)); + LLPointer volume = new LLVolume(volume_params, LLVolumeLODGroup::getVolumeScaleFromDetail(i)); volume->copyVolumeFaces(data.mModel[i]); volume->setMeshAssetLoaded(TRUE); } @@ -2165,8 +2157,6 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para return detail; } - LLFastTimer t(FTM_LOAD_MESH); - { LLMutexLock lock(mMeshMutex); //add volume to list of loading meshes @@ -2237,11 +2227,6 @@ S32 LLMeshRepository::loadMesh(LLVOVolume* vobj, const LLVolumeParams& mesh_para return detail; } -//static LLFastTimer::DeclareTimer FTM_START_MESH_THREAD("Start Thread"); -static LLFastTimer::DeclareTimer FTM_LOAD_MESH_LOD("Load LOD"); -static LLFastTimer::DeclareTimer FTM_MESH_LOCK1("Lock 1"); -static LLFastTimer::DeclareTimer FTM_MESH_LOCK2("Lock 2"); - void LLMeshRepository::notifyLoadedMeshes() { //called from main thread LLMeshRepoThread::sMaxConcurrentRequests = gSavedSettings.getU32("MeshMaxConcurrentRequests"); @@ -2343,18 +2328,9 @@ void LLMeshRepository::notifyLoadedMeshes() } } - LLFastTimer t(FTM_MESH_UPDATE); - - { - LLFastTimer t(FTM_MESH_LOCK1); - mMeshMutex->lock(); - } - - { - LLFastTimer t(FTM_MESH_LOCK2); - mThread->mMutex->lock(); - } - + mMeshMutex->lock(); + mThread->mMutex->lock(); + //popup queued error messages from background threads while (!mUploadErrorQ.empty()) { @@ -2406,7 +2382,6 @@ void LLMeshRepository::notifyLoadedMeshes() while (!mPendingRequests.empty() && push_count > 0) { - LLFastTimer t(FTM_LOAD_MESH_LOD); LLMeshRepoThread::LODRequest& request = mPendingRequests.front(); mThread->loadMeshLOD(request.mMeshParams, request.mLOD); mPendingRequests.erase(mPendingRequests.begin()); @@ -3553,18 +3528,18 @@ void LLMeshRepository::buildPhysicsMesh(LLModel::Decomposition& decomp) hull.mVertexBase = decomp.mHull[i][0].mV; hull.mVertexStrideBytes = 12; - LLCDMeshData mesh; #if MESH_IMPORT + LLCDMeshData mesh; LLCDResult res = LLCD_OK; if (LLConvexDecomposition::getInstance() != NULL) { res = LLConvexDecomposition::getInstance()->getMeshFromHull(&hull, &mesh); } if (res == LLCD_OK) -#endif //MESH_IMPORT { get_vertex_buffer_from_mesh(mesh, decomp.mMesh[i]); } +#endif //MESH_IMPORT } if (!decomp.mBaseHull.empty() && decomp.mBaseHullMesh.empty()) @@ -3574,18 +3549,18 @@ void LLMeshRepository::buildPhysicsMesh(LLModel::Decomposition& decomp) hull.mVertexBase = decomp.mBaseHull[0].mV; hull.mVertexStrideBytes = 12; - LLCDMeshData mesh; #if MESH_IMPORT + LLCDMeshData mesh; LLCDResult res = LLCD_OK; if (LLConvexDecomposition::getInstance() != NULL) { res = LLConvexDecomposition::getInstance()->getMeshFromHull(&hull, &mesh); } if (res == LLCD_OK) -#endif //MESH_IMPORT { get_vertex_buffer_from_mesh(mesh, decomp.mBaseHullMesh); } +#endif //MESH_IMPORT } } diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 70c67ee94..1fa3fcac6 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -46,7 +46,6 @@ #include "llsurface.h" #include "llsurfacepatch.h" #include "llvosky.h" -#include "llvotree.h" #include "llviewercamera.h" #include "llviewertexturelist.h" #include "llviewerregion.h" @@ -55,6 +54,7 @@ #include "llworld.h" #include "lldir.h" #include "llxmltree.h" +#include "llvotree.h" const S32 GRASS_MAX_BLADES = 32; const F32 GRASS_BLADE_BASE = 0.25f; // Width of grass at base