Quick 'n dirty prioritization scheme for mesh loading.
Sprinkling of fast timers in areas that are likely to stall.meow-7.2.2
parent
b6af8aae5b
commit
c6aaf115ad
|
|
@ -3387,6 +3387,8 @@ static LLFastTimer::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist");
|
|||
static LLFastTimer::DeclareTimer FTM_REGION_UPDATE("Update Region");
|
||||
static LLFastTimer::DeclareTimer FTM_WORLD_UPDATE("Update World");
|
||||
static LLFastTimer::DeclareTimer FTM_NETWORK("Network");
|
||||
static LLFastTimer::DeclareTimer FTM_AGENT_NETWORK("Agent Network");
|
||||
static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// idle()
|
||||
|
|
@ -3457,7 +3459,7 @@ void LLAppViewer::idle()
|
|||
|
||||
if (!gDisconnected)
|
||||
{
|
||||
LLFastTimer t(FTM_NETWORK);
|
||||
LLFastTimer t(FTM_AGENT_NETWORK);
|
||||
// Update spaceserver timeinfo
|
||||
LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + (U32)(dt_raw * SEC_TO_MICROSEC));
|
||||
|
||||
|
|
@ -3646,7 +3648,7 @@ void LLAppViewer::idle()
|
|||
//
|
||||
|
||||
{
|
||||
LLFastTimer t(FTM_NETWORK);
|
||||
LLFastTimer t(FTM_VLMANAGER);
|
||||
gVLManager.unpackData();
|
||||
}
|
||||
|
||||
|
|
@ -3891,7 +3893,12 @@ void LLAppViewer::sendLogoutRequest()
|
|||
static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME;
|
||||
#endif
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Network");
|
||||
static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Idle Network");
|
||||
static LLFastTimer::DeclareTimer FTM_MESSAGE_ACKS("Message Acks");
|
||||
static LLFastTimer::DeclareTimer FTM_RETRANSMIT("Retransmit");
|
||||
static LLFastTimer::DeclareTimer FTM_TIMEOUT_CHECK("Timeout Check");
|
||||
static LLFastTimer::DeclareTimer FTM_DYNAMIC_THROTTLE("Dynamic Throttle");
|
||||
static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit");
|
||||
|
||||
void LLAppViewer::idleNetwork()
|
||||
{
|
||||
|
|
@ -3945,7 +3952,10 @@ void LLAppViewer::idleNetwork()
|
|||
}
|
||||
|
||||
// Handle per-frame message system processing.
|
||||
gMessageSystem->processAcks();
|
||||
{
|
||||
LLFastTimer ftm(FTM_MESSAGE_ACKS);
|
||||
gMessageSystem->processAcks();
|
||||
}
|
||||
|
||||
#ifdef TIME_THROTTLE_MESSAGES
|
||||
if (total_time >= CheckMessagesMaxTime)
|
||||
|
|
@ -3983,26 +3993,41 @@ void LLAppViewer::idleNetwork()
|
|||
LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);
|
||||
|
||||
// Retransmit unacknowledged packets.
|
||||
gXferManager->retransmitUnackedPackets();
|
||||
gAssetStorage->checkForTimeouts();
|
||||
{
|
||||
LLFastTimer ftm(FTM_RETRANSMIT);
|
||||
gXferManager->retransmitUnackedPackets();
|
||||
}
|
||||
|
||||
{
|
||||
LLFastTimer ftm(FTM_TIMEOUT_CHECK);
|
||||
gAssetStorage->checkForTimeouts();
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
gViewerThrottle.updateDynamicThrottle();
|
||||
|
||||
{
|
||||
LLFastTimer ftm(FTM_DYNAMIC_THROTTLE);
|
||||
gViewerThrottle.updateDynamicThrottle();
|
||||
}
|
||||
|
||||
llpushcallstacks ;
|
||||
// Check that the circuit between the viewer and the agent's current
|
||||
// region is still alive
|
||||
LLViewerRegion *agent_region = gAgent.getRegion();
|
||||
if (agent_region && (LLStartUp::getStartupState()==STATE_STARTED))
|
||||
{
|
||||
LLUUID this_region_id = agent_region->getRegionID();
|
||||
bool this_region_alive = agent_region->isAlive();
|
||||
if ((mAgentRegionLastAlive && !this_region_alive) // newly dead
|
||||
&& (mAgentRegionLastID == this_region_id)) // same region
|
||||
LLFastTimer ftm(FTM_CHECK_REGION_CIRCUIT);
|
||||
LLViewerRegion *agent_region = gAgent.getRegion();
|
||||
if (agent_region && (LLStartUp::getStartupState()==STATE_STARTED))
|
||||
{
|
||||
forceDisconnect(LLTrans::getString("AgentLostConnection"));
|
||||
LLUUID this_region_id = agent_region->getRegionID();
|
||||
bool this_region_alive = agent_region->isAlive();
|
||||
if ((mAgentRegionLastAlive && !this_region_alive) // newly dead
|
||||
&& (mAgentRegionLastID == this_region_id)) // same region
|
||||
{
|
||||
forceDisconnect(LLTrans::getString("AgentLostConnection"));
|
||||
}
|
||||
mAgentRegionLastID = this_region_id;
|
||||
mAgentRegionLastAlive = this_region_alive;
|
||||
}
|
||||
mAgentRegionLastID = this_region_id;
|
||||
mAgentRegionLastAlive = this_region_alive;
|
||||
}
|
||||
llpushcallstacks ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,20 +189,30 @@ BOOL LLDrawable::isLight() const
|
|||
}
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_CLEANUP_DRAWABLE("Cleanup Drawable");
|
||||
static LLFastTimer::DeclareTimer FTM_DEREF_DRAWABLE("Deref");
|
||||
static LLFastTimer::DeclareTimer FTM_DELETE_FACES("Faces");
|
||||
|
||||
void LLDrawable::cleanupReferences()
|
||||
{
|
||||
LLFastTimer t(FTM_PIPELINE);
|
||||
LLFastTimer t(FTM_CLEANUP_DRAWABLE);
|
||||
|
||||
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
|
||||
mFaces.clear();
|
||||
{
|
||||
LLFastTimer t(FTM_DELETE_FACES);
|
||||
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
|
||||
mFaces.clear();
|
||||
}
|
||||
|
||||
gObjectList.removeDrawable(this);
|
||||
|
||||
gPipeline.unlinkDrawable(this);
|
||||
|
||||
// Cleanup references to other objects
|
||||
mVObjp = NULL;
|
||||
mParent = NULL;
|
||||
{
|
||||
LLFastTimer t(FTM_DEREF_DRAWABLE);
|
||||
// Cleanup references to other objects
|
||||
mVObjp = NULL;
|
||||
mParent = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void LLDrawable::cleanupDeadDrawables()
|
||||
|
|
|
|||
|
|
@ -183,22 +183,33 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
|
|||
mUsingAtlas = FALSE ;
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_DESTROY_FACE("Destroy Face");
|
||||
static LLFastTimer::DeclareTimer FTM_DESTROY_TEXTURE("Texture");
|
||||
static LLFastTimer::DeclareTimer FTM_DESTROY_DRAWPOOL("Drawpool");
|
||||
static LLFastTimer::DeclareTimer FTM_DESTROY_TEXTURE_MATRIX("Texture Matrix");
|
||||
static LLFastTimer::DeclareTimer FTM_DESTROY_DRAW_INFO("Draw Info");
|
||||
static LLFastTimer::DeclareTimer FTM_DESTROY_ATLAS("Atlas");
|
||||
static LLFastTimer::DeclareTimer FTM_FACE_DEREF("Deref");
|
||||
|
||||
void LLFace::destroy()
|
||||
{
|
||||
LLFastTimer t(FTM_DESTROY_FACE);
|
||||
if(mTexture.notNull())
|
||||
{
|
||||
LLFastTimer t(FTM_DESTROY_TEXTURE);
|
||||
mTexture->removeFace(this) ;
|
||||
}
|
||||
|
||||
if (mDrawPoolp)
|
||||
{
|
||||
LLFastTimer t(FTM_DESTROY_DRAWPOOL);
|
||||
mDrawPoolp->removeFace(this);
|
||||
mDrawPoolp = NULL;
|
||||
}
|
||||
|
||||
if (mTextureMatrix)
|
||||
{
|
||||
LLFastTimer t(FTM_DESTROY_TEXTURE_MATRIX);
|
||||
delete mTextureMatrix;
|
||||
mTextureMatrix = NULL;
|
||||
|
||||
|
|
@ -213,11 +224,21 @@ void LLFace::destroy()
|
|||
}
|
||||
}
|
||||
|
||||
setDrawInfo(NULL);
|
||||
{
|
||||
LLFastTimer t(FTM_DESTROY_DRAW_INFO);
|
||||
setDrawInfo(NULL);
|
||||
}
|
||||
|
||||
removeAtlas();
|
||||
mDrawablep = NULL;
|
||||
mVObjp = NULL;
|
||||
{
|
||||
LLFastTimer t(FTM_DESTROY_ATLAS);
|
||||
removeAtlas();
|
||||
}
|
||||
|
||||
{
|
||||
LLFastTimer t(FTM_FACE_DEREF);
|
||||
mDrawablep = NULL;
|
||||
mVObjp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -866,8 +866,12 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)
|
|||
mNumDeadObjects++;
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_REMOVE_DRAWABLE("Remove Drawable");
|
||||
|
||||
void LLViewerObjectList::removeDrawable(LLDrawable* drawablep)
|
||||
{
|
||||
LLFastTimer t(FTM_REMOVE_DRAWABLE);
|
||||
|
||||
if (!drawablep)
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1143,9 +1143,15 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj)
|
|||
}
|
||||
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_UNLINK("Unlink");
|
||||
static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_MOVE_LIST("Movelist");
|
||||
static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition");
|
||||
static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_LIGHT_SET("Light Set");
|
||||
static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set");
|
||||
|
||||
void LLPipeline::unlinkDrawable(LLDrawable *drawable)
|
||||
{
|
||||
LLFastTimer t(FTM_PIPELINE);
|
||||
LLFastTimer t(FTM_UNLINK);
|
||||
|
||||
assertInitialized();
|
||||
|
||||
|
|
@ -1154,6 +1160,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
|
|||
// Based on flags, remove the drawable from the queues that it's on.
|
||||
if (drawablep->isState(LLDrawable::ON_MOVE_LIST))
|
||||
{
|
||||
LLFastTimer t(FTM_REMOVE_FROM_MOVE_LIST);
|
||||
LLDrawable::drawable_vector_t::iterator iter = std::find(mMovedList.begin(), mMovedList.end(), drawablep);
|
||||
if (iter != mMovedList.end())
|
||||
{
|
||||
|
|
@ -1163,6 +1170,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
|
|||
|
||||
if (drawablep->getSpatialGroup())
|
||||
{
|
||||
LLFastTimer t(FTM_REMOVE_FROM_SPATIAL_PARTITION);
|
||||
if (!drawablep->getSpatialGroup()->mSpatialPartition->remove(drawablep, drawablep->getSpatialGroup()))
|
||||
{
|
||||
#ifdef LL_RELEASE_FOR_DOWNLOAD
|
||||
|
|
@ -1173,18 +1181,23 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)
|
|||
}
|
||||
}
|
||||
|
||||
mLights.erase(drawablep);
|
||||
for (light_set_t::iterator iter = mNearbyLights.begin();
|
||||
iter != mNearbyLights.end(); iter++)
|
||||
{
|
||||
if (iter->drawable == drawablep)
|
||||
LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET);
|
||||
mLights.erase(drawablep);
|
||||
|
||||
for (light_set_t::iterator iter = mNearbyLights.begin();
|
||||
iter != mNearbyLights.end(); iter++)
|
||||
{
|
||||
mNearbyLights.erase(iter);
|
||||
break;
|
||||
if (iter->drawable == drawablep)
|
||||
{
|
||||
mNearbyLights.erase(iter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
LLFastTimer t(FTM_REMOVE_FROM_HIGHLIGHT_SET);
|
||||
HighlightItem item(drawablep);
|
||||
mHighlightSet.erase(item);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue