-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/104/
-----------------------------------------------------------

Review request for Viewer.


Summary
-------

Changes the caching of avatar display names and other information from
the People API to be more aggressive.

The expiration time (which is derived from the cache controls of the
HTTP responses), is now treated primarily as a maximum time before
which the name information should be refreshed.  When the ::get method
is called on an entry older than its expiration time, an attempt is
made to refresh the entry; if that attempt returns a failure, the
cached entry is returned anyway.

In the event of error returns from the People API when there is no
cached entry, the legacy name system is queried to create temporary
results; these are never cached in the LLAvatarNameCache.  This
applies both to HTTP request errors and to names that the PeopleAPI
explicitly returns as error responses (the latter were the ones that
previously created "???" temporary names - these are never created
within the viewer now).

The only time that entries are actually removed from the cache is a
check made immediately after loading and every 20 minutes
(MAX_UNREFRESHED_TIME) thereafter: entries whose expiration time is
more than 20 minutes in the past are deleted.

Also added extensive logging, mostly at DEBUG level, under the "AvNameCache" 
tag. 


This addresses bug dn-202.
    http://jira.secondlife.com/browse/dn-202


Diffs
-----

  indra/llcommon/llavatarname.h 422f636c3343 
  indra/llcommon/llavatarname.cpp 422f636c3343 
  indra/llmessage/llavatarnamecache.h 422f636c3343 
  indra/llmessage/llavatarnamecache.cpp 422f636c3343 
  indra/newview/llappviewer.cpp 422f636c3343 
  indra/newview/llimview.cpp 422f636c3343 

Diff: http://codereview.secondlife.com/r/104/diff


Testing
-------

Hung out in busy welcome areas to get lots of name requests.

Confirmed that refresh behavior was correct, and observed a number of
HTTP error returns (both 499 Timeout, the most common, and 404 Not
Found) from the People API.  Saw that the fallback was correct (many
examples of both falling back to a previously cached display name and
to the legacy name when no cache was available).  All of these were
then correctly refreshed (the next attempt was almost always
successful).

Observed only a couple of cases of the People API returning unresolved
names (the case that previously lead to "???" being used).  The
behavior was correct, but some more testing on a development grid
where this error is forced may be a good idea.

Moved to a nice quiet empty region, and observed that the cache
cleaning occurred correctly after 20 minutes.

Confirmed that cached values were saved and reloaded correctly.


Thanks,

Oz

_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to