void LLAvatarNameCache::idle() { // By convention, start running at first idle() call sRunning = true; // *TODO: Possibly re-enabled this based on People API load measurements // 100 ms is the threshold for "user speed" operations, so we can // stall for about that long to batch up requests. //const F32 SECS_BETWEEN_REQUESTS = 0.1f; //if (!sRequestTimer.checkExpirationAndReset(SECS_BETWEEN_REQUESTS)) //{ // return; //} if (!sAskQueue.empty()) { if (useDisplayNames()) { requestNamesViaCapability(); } else { // ...fall back to legacy name cache system requestNamesViaLegacy(); } } // erase anything that has not been refreshed for more than MAX_UNREFRESHED_TIME eraseUnrefreshed(); }
void LLAvatarNameCache::idle() { // By convention, start running at first idle() call sRunning = true; // *TODO: Possibly re-enabled this based on People API load measurements // 100 ms is the threshold for "user speed" operations, so we can // stall for about that long to batch up requests. //const F32 SECS_BETWEEN_REQUESTS = 0.1f; //if (!sRequestTimer.checkExpirationAndReset(SECS_BETWEEN_REQUESTS)) //{ // return; //} // Must be large relative to above // No longer deleting expired entries, just re-requesting in the get // this way first synchronous get call on an expired entry won't return // legacy name. LF //const F32 ERASE_EXPIRED_TIMEOUT = 60.f; // seconds //if (sEraseExpiredTimer.checkExpirationAndReset(ERASE_EXPIRED_TIMEOUT)) //{ // eraseExpired(); //} if (sAskQueue.empty()) { return; } if (useDisplayNames()) { requestNamesViaCapability(); } else { // ...fall back to legacy name cache system requestNamesViaLegacy(); } }
void LLAvatarNameCache::idle() { // By convention, start running at first idle() call sRunning = true; // *TODO: Possibly re-enabled this based on People API load measurements // 100 ms is the threshold for "user speed" operations, so we can // stall for about that long to batch up requests. const F32 SECS_BETWEEN_REQUESTS = 0.1f; if (!sRequestTimer.hasExpired()) { return; } if (!sAskQueue.empty()) { if (usePeopleAPI()) { requestNamesViaCapability(); } else { LL_WARNS_ONCE("AvNameCache") << "LLAvatarNameCache still using legacy api" << LL_ENDL; requestNamesViaLegacy(); } } if (sAskQueue.empty()) { // cleared the list, reset the request timer. sRequestTimer.resetWithExpiry(SECS_BETWEEN_REQUESTS); } // erase anything that has not been refreshed for more than MAX_UNREFRESHED_TIME eraseUnrefreshed(); }