All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

VWR-25923 Unnecessary capability request spam

Review Request #333 - Created June 9, 2011 and submitted

Jonathan Yap Reviewers
2.7 viewer
VWR-25923
None viewer-development
This is a patch by ArminWeatherHax.  I am creating the request to help speed this fix along in the system.

----

Ways to reproduce: log into a simulator.
Reproduces: always
Affects: any version supported, probably all 3rd party viewers but Kokua (and Imprudence, soon).

What happens:
In each idle cycle the voice client requests the "ParcelVoiceInfoRequest" capability, thats each time a HTTP GET.
See LLVivoxVoiceClient::stateMachine() after comment // Check for parcel boundary crossing

Expected:
On parcel/region change request the capability once. It's not the region that rezzes in, but the avatar, so do the request for the capability not earlier than the agents region signals capabilitiesReceived() true. After that you are sure if the region returns an empty url you can give up for that region.

Not sure about the impact on lag - requesting and returning an url is not much data transmitted, though its a pretty big number of people doing it over and over per second (no matter if they have voice on or off).


----

going once again through llviewerregion I see its fortunately not each time a HTTP GET, just once when the agent connects to the region. Though the patch still saves all the lookup if the cap is there while it can't be possibly.

 
Review request changed
Updated (June 24, 2011, 4:45 a.m.)
Posted (June 24, 2011, 6:05 a.m.)

   

  
indra/newview/llvoicevivox.h (Diff revisions 1 - 2)
 
 
 
 
 
 
 
Very good idea to explain the semantics of this field in detail, as the name alone doesn't give it away fully. :-)
indra/newview/llvoicevivox.cpp (Diff revisions 1 - 2)
 
 
These are two sentences. Use a period instead of a comma.
indra/newview/llvoicevivox.cpp (Diff revisions 1 - 2)
 
 
requestParcelInfo() might be a more natural name than using 'do'.
indra/newview/llvoicevivox.h (Diff revision 2)
 
 
Not a native speaker myself, but I don't think 'keep s.th. staying in <a state>' is proper English. Maybe either write
	// Setting mRegionHasVoiceCaps to false makes the voice client stay in stateDisabled.
or simply
	// Setting mRegionHasVoiceCaps to false keeps the voice client in stateDisabled.
indra/newview/llvoicevivox.h (Diff revision 2)
 
 
This sentence confused me for some reason. I guess 'allows to leave' would be clearer than 'allows escaping'.
indra/newview/llvoicevivox.cpp (Diff revision 2)
 
 
 
 
 
 
I think this should be "changed region before the region cap response for the previous region arrived" to be clear.
indra/newview/llvoicevivox.cpp (Diff revision 2)
 
 
https://wiki.secondlife.com/wiki/Coding_standard#Naming_Convention says local variables should be lower_case, not camelCase so make this parcel_local_ID.
indra/newview/llvoicevivox.cpp (Diff revision 2)
 
 
 
What does the first 'it' refer to? "ID with" what?
indra/newview/llvoicevivox.cpp (Diff revision 2)
 
 
 
Why not directly
		mCurrentRegion = gAgent.getRegion();
and then use mCurrentRegion in the rest of this method?
indra/newview/llvoicevivox.cpp (Diff revision 2)
 
 
 
Here, too, either just 'keeps' without 'staying' or 'makes [...] stay', I think.
Ship it!
Posted (June 24, 2011, 9:15 a.m.)
No major objections now, thanks.
Posted (June 25, 2011, 8:30 a.m.)
When I applied this latest patch to firestorm, which is based off of LL 2.5.2, I kept getting timed out when TPing from a mainland area and a DD of 256 to other regions.  I tried multiple times TPing from the area around help island public to magnum sandbox 4 or to help people island.  In every case I timed and was logged off after the TP was completed, as the viewer was cleaning up and closing connections to the old regions.  I don't have this problem with the first iteration of this patch.  I feel this scenario needs to be tested with this latest patch on v-dev tip to make sure this doesn't happen there as well.

The account I used only has 4 friends, and around 24 items in the inventory in addition to the library.  It also only has 2 attachments (a hud and the firestorm bridge) and is one of the noob outfits.  I also am running on an i7 2600k, 16GB ram, ATI 6970, and 20/5mbit FIOS connection.
  1. Could you please provide exact steps to reproduce the issue?
    Have you tried reverting the patch and repeating the teleport attempt?
  2. I TPed to Help Island Public, which is on maind land, while running from Visual Studio.  Draw distance set to 256.  Flew over orentation island and proceeded onto another neighboring sim.  My viewer is now connected to several different regions do to normal viewer behavior.  I then TP to magnum sandbox 4 by tyeping that into the nav bar up top and pressing enter.  
    
    First tried with the first patch, which we have had for several weeks now in our repository:
    -TP was successful, then the viewer became rather unresponsive and the logs say things related to "(ip address) time out exceeded, disconnecting" but eventually recovers
    -repeated 3 times, last time I TPed to Help People Island instead and all times got the same result
    
    Second I tried with the updated patch:
    -TP was successful, then the viewer was completely unresponsive, and I eventually got the ding from getting logged off and in the loges I see a mass of "invalid packet from (IP address)"
    -repeated 3 times like and to the same regions (twice to magnum, once to HPI) every time I got logged off
    
    Third I reverted back to the first patch:
    Same experience as the first:
    -TP was successful, then the viewer became rather unresponsive and the logs say things related to "(ip address) time out exceeded, disconnecting" but eventually recovers
    -repeated 3 times, last time I TPed to HPI as I have in the other tests, and all times got the same result 
    
    
    In talking with armin, he got similer results but thinks its the magnum sandbox region that may be having problems.  I am not as sure on that as I get it when TPing to HPI as well which is release server channle and not a RC channle.
  3. Thanks, Tankmaster. I tend to think that these errors are not related to the patch.