Bring back showing total pending downloads in viewer stats.
needs info
Lucia Nightfire
Years ago, viewer stats accurately showed total pending downloads, not just the value of 1 at a time.
Whenever you go to a region where people are constantly teleporting in or are attaching things or are rezzing things and you try to also do the same, sometimes you're sitting there waiting 10, 20, 30, 60 seconds for your object(s) to appear.
Looking at stats does not help as it only shows a maximum value of 1 for pending download at a time regardless of how many are in the queue.
Pending uploads (takes/detaches/returns) are not affected as it is capable of showing more than a value of 1.
Having an accurate reading allows users to know how busy the region is before attempting attaching/rezzing and to see/track their place in the queue when they do so.
Scripted rezzers, thanks to llGetSimStats(SIM_STAT_ASSET_DOWNLOADS), can also better track queue placement and content 'arrival' times.
If changing the output of the metric in viewer stats is not feasible, please give us access to the rez queue count metric via a new llGetSimStats() constant so a scripted means can be used instead.
Thanks.
Log In
Maestro Linden
needs info
Maestro Linden
Hi Lucia Nightfire, I'm seeing different behavior than this:
Looking at stats does not help as it only shows a maximum value of 1 for pending download at a time regardless of how many are in the queue.
My test case was to create a a few separate object assets in my agent inventory, each containing 1000 scripts, each with a unique ~64KB memory state. When rezzing the 1st object, the 'Pending Downloads' stat goes to 1. When I rez the 2nd one, the stat updates to 2. The 'Pending Downloads' stat remains at 2 until the objects rez, which seems correct to me. Are you seeing different results when rezzing multiple large and distinct object assets?
Lucia Nightfire
Maestro Linden
Here is a looped rezzer script I made that repros the issue:
Init()
{
llSetTimerEvent(0.0);
llSetText("",ZERO_VECTOR,1.0);
rezzing = FALSE;
llResetTime();
}
integer rezzing;
integer rez_index = -1;
integer rez_total;
string inv_name;
vector my_pos;
default
{
state_entry()
{
Init();
}
on_rez(integer i)
{
Init();
}
touch_end(integer t)
{
if (llDetectedKey(0) == llGetOwner())
{
if (!rezzing)
{
if (llGetTime() > 2.0)
{
if (rez_total = llGetInventoryNumber(INVENTORY_OBJECT))
{
rezzing = TRUE;
my_pos = llGetPos();
rez_index = -1;
llSetTimerEvent(0.2);
llResetTime();
}
else
{
llOwnerSay("no objects in inventory");
}
}
else
{
llOwnerSay("Please try again in a few seconds.");
}
}
else
{
llOwnerSay("stopping rezzing protocol");
Init();
}
}
}
timer()
{
for (++rez_index; rez_index < rez_total; rez_index++)
{
llSetText((string)(rez_index + 1) + "/" + (string)rez_total,<1.0,1.0,1.0>,1.0);
if (llGetInventoryPermMask(inv_name = llGetInventoryName(INVENTORY_OBJECT,rez_index),MASK_OWNER) & PERM_COPY)
{
llOwnerSay("Rezzing: '" + inv_name + "' Asset Downloads: " + (string)llGetSimStats(SIM_STAT_ASSET_DOWNLOADS));
llRezObjectWithParams(inv_name,[REZ_FLAGS,REZ_FLAG_TEMP,REZ_POS,llGetPos() + <0.0,0.0,2.0>,FALSE,TRUE]);
return;
}
else
{
llOwnerSay("Skipping the object '" + inv_name + "' as it is no-copy for owner...");
}
}
llOwnerSay("Finished rezzing.");
Init();
}
}
Lucia Nightfire
This script reports asset downloads value as seen by llGetSimStats(). As for "payload", I used a bunch of Ayashi brand hair sets as they use unique mesh per link and are high-ish link count.
Demo hair will also work.
This kind of test, though, is good for one pass as afterwards, the mesh will have been cached by the server and will rezz much faster, so you'll have to do the test again in another region.
Maestro Linden
Lucia Nightfire: Thanks for the script and asset pointer. I tried it a few times with the hair meshes you recommended, and also with my own favorite test hairstyle ( https://marketplace.secondlife.com/p/Curio-Obscura-Rococo-Fantastico-Hairstyle/615020 ; contains something like 770 LSL scripts).
I'm seeing a _little_ higher than 1 pending download when I test in a fresh test region:
Here's a version of the object that purely rezzed Ayashi demo hairstyles:
Rezzing: '[^.^Ayashi^.^] DEMO Aqua hair-L' Asset Downloads: 0.000000
Rezzing: '[^.^Ayashi^.^] DEMO Eva hair-M' Asset Downloads: 0.178219
Rezzing: '[^.^Ayashi^.^] DEMO Ginny hair-Version2-Unrigged' Asset Downloads: 0.499828
Rezzing: '[^.^Ayashi^.^] DEMO Ichigo ears-Unrigged' Asset Downloads: 0.879216
Rezzing: '[^.^Ayashi^.^] DEMO Ichigo hair-M' Asset Downloads: 1.194762
Rezzing: '[^.^Ayashi^.^] DEMO Miu hair with cap-Version2 (Unrigged)' Asset Downloads: 1.289638
Rezzing: '[^.^Ayashi^.^] DEMO Nitori hair-Ver3-M' Asset Downloads: 1.439873
Rezzing: '[^.^Ayashi^.^] DEMO Tidzuru hair-M(Hairpins)' Asset Downloads: 1.545337
Finished rezzing.
in this particular run my viewer's stat briefly reported 'Pending downloads' at slightly higher than 4.0 before dropping down to the ~2.6 value that your script reports:
Rezzing: '[^.^Ayashi^.^] DEMO Ginny hair-Version1-Unrigged' Asset Downloads: 0.000000
Rezzing: '[^.^Ayashi^.^] DEMO Ginny hair-Version2-Unrigged' Asset Downloads: 0.189514
Rezzing: '[^.^Ayashi^.^] DEMO Ginny hair-Version3-Unrigged' Asset Downloads: 0.536483
Rezzing: '[^.^Ayashi^.^] DEMO Ginny hair-Version4-Unrigged' Asset Downloads: 0.808627
Rezzing: '[^.^Ayashi^.^] DEMO HUD Color hair-Fatpack' Asset Downloads: 1.128613
Rezzing: 'other Rococo Fantastico Hairstyle' Asset Downloads: 1.423528
Rezzing: 'other Rococo Fantastico Hairstyle 1' Asset Downloads: 1.788429
Rezzing: 'other Rococo Fantastico Hairstyle 2' Asset Downloads: 2.208100
Rezzing: 'other Rococo Fantastico Hairstyle 3' Asset Downloads: 2.562549
Finished rezzing.
I'm wondering if the llRezObject sleep delay in the script is simply preventing the script from pushing the rez pipeline hard enough to get 'pending downloads' any higher (at least for a long enough time for it to show up in the viewer stat and llGetSimStats)
Maestro Linden
Lucia Nightfire: here's another attempt that's maybe more helpful. I started with your script, but changed it so that the script in link N rezzes the Nth object in inventory. I then duplicated and linked the test object so that there was a linkset of N prims, with each script configured to rez its designated object when the 'rez' chat command was issued. This version of the script looks like this:
// Place this script in a prim with N objects in its inventory, then
string inv_name;
default
{
state_entry()
{
llListen(0, "", llGetOwner(), "rez");
}
listen(integer channel, string name, key id, string msg)
{
// rez an object indexed by the link number of this script (link #1 rezzes the first object, link #2 rezzes the 2nd, etc.)
if (llGetInventoryPermMask(inv_name = llGetInventoryName(INVENTORY_OBJECT, llGetLinkNumber()-1),MASK_OWNER) & PERM_COPY)
{
llOwnerSay("Link #" + (string)llGetLinkNumber() + " rezzing: '" + inv_name);
llSleep(0.1);
llRezObjectWithParams(inv_name,[REZ_FLAGS,REZ_FLAG_TEMP,REZ_POS,llGetPos() + <0.0,0.0,2.0>,FALSE,TRUE]);
return;
}
else
{
llOwnerSay("Skipping the object '" + inv_name + "' as it is no-copy for owner...");
}
llOwnerSay("Link #" + (string)llGetLinkNumber() + " finished rezzing.");
}
}
To monitor sim stats, I have a script in a separate object also trigger on the 'rez' chat command and to continuously poll SIM_STAT_ASSET_DOWNLOADS, while tracking the high water mark. That script looks like this:
float maxPending;
default
{
state_entry()
{
llSetObjectName("Poll Pending Downloads");
llListen(0, "", llGetOwner(), "rez");
}
listen(integer channel, string name, key id, string msg)
{
llResetTime();
maxPending = 0;
float pending = 0;
float pollPeriod = 20.0; // how long to poll for
while(llGetTime() < pollPeriod)
{
pending = llGetSimStats(SIM_STAT_ASSET_DOWNLOADS);
if(pending > maxPending)
{
maxPending = pending;
}
}
llOwnerSay("Max pending asset downloads over past " + (string)pollPeriod
+ " seconds was " + (string)maxPending);
}
}
Maestro Linden
My test runs with the Ayako hairstyles with these scripts seemed to be somewhere around 2-3 pending downloads:
Maestro Linden: rez
Link #2 rezzing: '[^.^Ayashi^.^] DEMO Eva hair-M
Link #8 rezzing: '[^.^Ayashi^.^] DEMO Tidzuru hair-M(Hairpins)
Link #6 rezzing: '[^.^Ayashi^.^] DEMO Miu hair with cap-Version2 (Unrigged)
Link #1 rezzing: '[^.^Ayashi^.^] DEMO Aqua hair-L
Link #3 rezzing: '[^.^Ayashi^.^] DEMO Ginny hair-Version2-Unrigged
Link #5 rezzing: '[^.^Ayashi^.^] DEMO Ichigo hair-M
Link #7 rezzing: '[^.^Ayashi^.^] DEMO Nitori hair-Ver3-M
Link #4 rezzing: '[^.^Ayashi^.^] DEMO Ichigo ears-Unrigged
Max pending asset downloads over past 20.000000 seconds was 2.573741
Lucia Nightfire
Maestro Linden
Yes, there is a brief burst, but it only lasts aroiund a second.
Here is your "Poll Pending Downloads" script, but modded to show how many pending samples are spent at 1.000000, sub-1.0, 0.0 and their percentages:
default
{
state_entry()
{
llSetObjectName("Poll Pending Downloads");
llListen(0,"",llGetOwner(),"rez");
llSetText("",ZERO_VECTOR,1.0);
}
on_rez(integer start_param)
{
llSetText("",ZERO_VECTOR,1.0);
}
listen(integer channel, string name, key id, string msg)
{
llResetTime();
float maxPending;
integer sample_count;
integer capped_count;
integer sub_capped_count;
integer zero_count;
float pending = 0;
float pollPeriod = 20.0; // how long to poll for
while(llGetTime() < pollPeriod)
{
pending = llGetSimStats(SIM_STAT_ASSET_DOWNLOADS);
sample_count++;
if(pending > maxPending)
{
maxPending = pending;
}
else if (pending == 1.0)
{
capped_count++;
}
else if (pending > 0.0)
{
sub_capped_count++;
}
else
{
zero_count++;
}
llSetText((string)pending,<1.0,1.0,1.0>,1.0);
}
llOwnerSay("Max pending asset downloads over past " + (string)pollPeriod + " seconds was " + (string)maxPending +
" Samples: " + (string)sample_count +
" Capped Samples: " + (string)capped_count + " (" + llGetSubString((string)((capped_count * 100.0) / sample_count),0,-6) + "%)" +
" Sub-Capped Samples: " + (string)sub_capped_count + " (" + llGetSubString((string)((sub_capped_count * 100.0) / sample_count),0,-6) + "%)" +
" Zero Samples: " + (string)zero_count + " (" + llGetSubString((string)((zero_count * 100.0) / sample_count),0,-6) + "%)");
llSetText("",ZERO_VECTOR,1.0);
}
}
I also added this to the rezzer script to clean up the rezzed objects:
object_rez(key k)
{
llDerezObject(k,DEREZ_DIE);
}
Notice by the added hover text visual, that the last 19s after the 'rez' command is issued, pending downloads never goes over 1.000000 despite objects visibily continuing to be rezzed. There is still a queue being used during this time.
Lucia Nightfire
My typos fixes aren't allowed to be resaved for some reason.