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.
Posted (June 9, 2011, 1:48 p.m.)
-
indra/newview/llvoicevivox.h (Diff revision 1) -
I think is better put a comment (generic too) here about the meaning and usage of mRegionHasVoice
-
indra/newview/llvoicevivox.cpp (Diff revision 1) -
not sure is a nice choice remove the warn, a resident lose the only way to know if all work fine
Posted (June 20, 2011, 9:49 a.m.)
Seems to work for me, although I'd appreciate if you used a more straightforward (=less error prone) logic.
-
indra/newview/llvoicevivox.cpp (Diff revision 1) -
Inconsistent spacing around "if" conditions. Please use "if (cond)" with no extra or missing spaces. This also applies to other changes in the patch.
-
indra/newview/llvoicevivox.cpp (Diff revision 1) -
It's unclear to me why you set voice to enabled here. I think it should be set to enabled only when we're sure the parcel supports it.
-
indra/newview/llvoicevivox.cpp (Diff revision 1) -
What if region caps never arrive? The string may grow infinitely. Also I don't like using region name as a marked that region caps haven't arrived yet -- that's a hack.
-
indra/newview/llvoicevivox.cpp (Diff revision 1) -
This could be written shorter: mRegionHasVoice = enabled;
Posted (June 24, 2011, 3:52 a.m.)
I pushed a new version of the patch to https://bitbucket.org/ArminW/vwr-25923 Its 2 commits: * first Vadims patch * then my patch addressing the reviews here
Review request changed
Updated (June 24, 2011, 4:45 a.m.)
-
- added Diff r2
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.
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.
Other reviews