Jump to content
Prokofy Neva

Stop 'N Shop Does Not Have to Be So Laggy

Recommended Posts

I went there again yesterday, and I'm extremely sure it's mainly other avatars and their scripts. If a person goes shopping with their animated pets, you can be sure they didn't descript one single thing.
The most lag I've noticed was at the sim where one creator gifts the customers a giftcard, and yeah, almost everybody I saw there was in elaborate outfits, with animated parts, blinking, yada yada. 

I'm in favor of kicking anyone above a certain - low!- scriptcount/memory usage, or turning of scripts in general. Most Ao's tend to still work, and if not, everyone one using FS can use the integrated Ao, and if that's not a possibility - I'd rather newbwalk through an event than rubberbanding 10 minutes just to get to the shop next door. 

  • Like 2

Share this post


Link to post
Share on other sites

Just a caution about bouncing avatars for resource usage: There's no mechanism for the sim to know about viewer-side rendering complexity; the best it can do is get viewers to tell it what they think that rendering complexity might be. I don't think Project ARCTAN does anything smarter than this.

Scripts are even worse unless you're prepared to region- or estate-ban offenders so they can't try again. And it's hard to know who to ban anyway: although the sim knows how much time an avatar's scripts are using instantaneously, that number is much higher on arrival than later when the scripts are loaded. The script memory measurement is completely useless -- it mismeasures so badly that script count is more accurate. But in any case, if the offender isn't prevented from trying again, it can easily make the problem many times worse to ban them and have them return, repeating all that expensive script-loading that happens upon arrival.

  • Thanks 1

Share this post


Link to post
Share on other sites

I visited two of the shopping regions, Gilded and Aurillian. Neither was crowded, it looked like there were maybe a dozen other avatars in each. Gilded was fine, great frame rate, no problem walking, flying or anything. Aurillian was a nightmare. The frame rate was fine, but moving was like walking in glue, with plenty of rubberbanding. If I was a vendor and got stuck there, I'd be pissed. If Aurillian was the first region I landed in at the event (it was) I wouldn't have spent any more time on it. The only reason I went back this morning was curiosity sparked by the comments in this thread.

  • Like 1

Share this post


Link to post
Share on other sites

I went around on the soft opening day. It was mostly fine, but a few regions did lag more than others, which suggests something in those builds was setting it off (Aurelian was laggy for me as well). Which isn't to say I think the mall building is perfect. The ponds act as avatar traps. But the regions are pretty identical, so that lag difference was most likely down to merchant builds.

Share this post


Link to post
Share on other sites
3 minutes ago, Polenth Yue said:

I went around on the soft opening day. It was mostly fine, but a few regions did lag more than others, which suggests something in those builds was setting it off (Aurelian was laggy for me as well). Which isn't to say I think the mall building is perfect. The ponds act as avatar traps. But the regions are pretty identical, so that lag difference was most likely down to merchant builds.

And one shop is giving away a 500 linden gift certificate.  Might be in Aurenlian --- just happy it is not in my region :D.   

I am sure that there are some heavy mesh creation and giant textures floating around. I didn't actually notice any when I was shopping but there are bound to be.   A large majority of merchants really have no idea bout triangle count, LODs and huge textures. They just put out what is pretty. So having "good practices" as part of the Hop and Shop criteria would likely kill the whole thing. 

 

Everyone DOES have a choice of course. They can go or not go. It isn't like a required event - LOL.   Personally I think this round was better lag-wise than the previous events. And having more sims evened out the visitors even at the beginning. I never saw many folks in the overflow areas -- and didn't expect to with twice as many shops to peruse.  

Share this post


Link to post
Share on other sites
6 minutes ago, Chic Aeon said:

Everyone DOES have a choice of course. They can go or not go. It isn't like a required event - LOL.   Personally I think this round was better lag-wise than the previous events. And having more sims evened out the visitors even at the beginning. I never saw many folks in the overflow areas -- and didn't expect to with twice as many shops to peruse.  

The extra shops did help a lot and meant the range of stuff was better (a complaint I had last year... this year I got a bunch of cute pets and decor things). The soft opening was also nice. Doesn't hurt to offer some lag feedback though, as it might be the Moles will be able to pinpoint what's going wrong in the laggiest region.

Share this post


Link to post
Share on other sites
2 hours ago, Polenth Yue said:

. Doesn't hurt to offer some lag feedback though, as it might be the Moles will be able to pinpoint what's going wrong in the laggiest region.

Here is your answer on the "problematic" sim.  

Addams    http://maps.secondlife.com/secondlife/Aurelian/165/93/53

 

500 gift card.  I was next door to Blueberry one time with a store credit voucher and you could NOT MOVE for-e-ver. This with just five regions or maybe four. I don't remember. So I don't think it is a region issue, just crowds most likely.  

Share this post


Link to post
Share on other sites

The moles part of the build seems fairly ok.   The lag is there for sure, but it's from the stores who have decorated their booths imho.  I went to Gilded today.

I took this screenshot and blurred names, but one store had used a lamp 22 times in their small store space.
Each lamp shows 25885 VRAM.  There are FIVE x 1024 textures on each of those lamps (they did luckily also use 2 x 32 textures ha).  The lamp is tiny and could have been done with 1 x 512 texture for the whole thing.

The individual who used it probably doesn't realize what a terrible lamp it is sadly - but also they didn't need it 22 times in their store too.  

I think it was clear there were no parameters for stores in terms of best practice.  In fairness the only best practice creators have had is what we have individually gleaned from learning from forums, other creators and those who kindly share their knowledge on what "good" looks like.  Personally I am a mile away from good myself (I still learn by the day!).  However, I do feel that for large corporate led events like these, having a moderator for content quality and proper event guide on things like texture sizes, what contributes to lag, complexity etc would help everybody including those who enjoy visiting the events.

Screen Shot 2020-07-01 at 2.19.56 PM.jpg

Edited by Charlotte Bartlett
  • Thanks 1

Share this post


Link to post
Share on other sites
15 hours ago, Chic Aeon said:

Here is your answer on the "problematic" sim.  

Addams    http://maps.secondlife.com/secondlife/Aurelian/165/93/53

 

500 gift card.  I was next door to Blueberry one time with a store credit voucher and you could NOT MOVE for-e-ver. This with just five regions or maybe four. I don't remember. So I don't think it is a region issue, just crowds most likely.  

Ha, yes. But turning on "Show friends only" worked beautifully. I've been there with all my female avatars. Thankfully I had no vendor lag.

When Scandalize send out a group message about a 1 L fatpack for 1 hour... that is stampede and lagfest. Shop and Hop is just a baby lag compared to that.

Share this post


Link to post
Share on other sites
1 hour ago, Charlotte Bartlett said:

Each lamp shows 25885 VRAM.  There are FIVE x 1024 textures on each of those lamps (they did luckily also use 2 x 32 textures ha).  The lamp is tiny and could have been done with 1 x 512 texture for the whole thing.

Well obviously THAT is a bad thing LOL. I sometimes wonder if folks making mesh realize they can bake  ALL THE TEXTURES (for smallish items like many decor and furniture pieces) onto ONE TEXTURE.   

 

I did want to add (and someone in the know feel free to correct me) but it was stated here on the forums  -- maybe a year ago or more -- that TEXTURES once loaded are in cache and only need to be downloaded once -- BUT that mesh object  "instancing" (using the same mesh over and over) does NOT help in SL. It does in many platforms.    So if that really IS correct (I tend to not pay attention to folks who I don't know "know" :D then the mesh part of the equation was likely more important than the texture.   

 

I DO agree though and as I said above somewhere, most creators really don't understand this even though many of us have tried to explain over MANY years :D.    

 

Share this post


Link to post
Share on other sites
2 minutes ago, Marianne Little said:

Ha, yes. But turning on "Show friends only" worked beautifully. I've been there with all my female avatars. Thankfully I had no vendor lag.

When Scandalize send out a group message about a 1 L fatpack for 1 hour... that is stampede and lagfest. Shop and Hop is just a baby lag compared to that.

I automatically derender everyone in "nearby" when I go to a venue.  I don't really care what everyone is wearing; I just want to see the STUFF.   

Share this post


Link to post
Share on other sites
2 hours ago, Charlotte Bartlett said:

one store had used a lamp 22 times in their small store space.
Each lamp shows 25885 VRAM.  There are FIVE x 1024 textures on each of those lamps (they did luckily also use 2 x 32 textures ha).  The lamp is tiny and could have been done with 1 x 512 texture for the whole thing.

Absolutely true, but although the VRAM usage there is listed individually, they are most likely copies of the same object or share at least some textures. In that case the memory usage is almost* nullified for each copy after the first. 

But just to make it clear -- 5*1024 is not acceptable for a lamp, lol.

@Chic Aeon I don't know for sure but even if the mesh data was entirely duplicated for each copy, the textures on the mesh would still only be in memory once and use way more than the mesh. Mesh is pretty compressible. 

 

Edited by Wulfie Reanimator
  • Like 2

Share this post


Link to post
Share on other sites
6 minutes ago, Wulfie Reanimator said:

Absolutely true, but although the VRAM usage there is listed individually, they are most likely copies of the same object or share at least some textures.

   Newb question. The VRAM is still multiplied by the amount of copies though, yeah? 

Share this post


Link to post
Share on other sites
38 minutes ago, Orwar said:

   Newb question. The VRAM is still multiplied by the amount of copies though, yeah? 

Nope, I don't know if it ever was. To give a more concrete example, here's one mesh:

cbe32da329.png

Here's two of the same bed:

948b522ffa.png

Note: Faces/Triangles go up, but texture count, TMem (Texture memory) and VRAM (mesh included) remains the same.

Without taking a deep dive into the memory management of the viewer (or explaining very technical details like the memory overhead of just keeping track of instances in memory), that's the easiest explanation I can give.

Edited by Wulfie Reanimator
  • Thanks 1

Share this post


Link to post
Share on other sites
1 minute ago, Wulfie Reanimator said:

Note: Faces/Triangles go up, but texture count TMem (Texture memory) and VRAM (mesh included) remains the same.

   Oh. Well, I knew textures worked that way (there were tutorials on how to put several signs on a texture and just aligning the texture in such a way that only the sign you wanted on a given surface is shown, to save upload costs and TMem), but I thought VRAM worked .. Differently .. Then again, I suppose .. Huh. Yeah, okay. 

   So essentially, putting up several copies of the same object doesn't impact the frame rate? 

Share this post


Link to post
Share on other sites
53 minutes ago, Orwar said:

   Oh. Well, I knew textures worked that way (there were tutorials on how to put several signs on a texture and just aligning the texture in such a way that only the sign you wanted on a given surface is shown, to save upload costs and TMem), but I thought VRAM worked .. Differently .. Then again, I suppose .. Huh. Yeah, okay. 

   So essentially, putting up several copies of the same object doesn't impact the frame rate? 

You made me do it.

It's a little more nuanced than that.

Let's say you're trying to render a scene with a simple cube in it. 6 sides, 2 triangles per side, 12 triangles. Let's ignore the texture on it.

Rendering one on the screen is fine. Creating 300'000 copies of that cube would mean that your computer would have to sort 3.6 million triangles* (to determine which ones are facing the camera, or behind other triangles) and then put pixels on the screen one by one. Depending how the code is written, the same pixel might be drawn-over multiple times.

Infinite memory still means your computer has to spend time doing many more calculations before generating an image. This is what causes your framerate to drop. It simply takes longer to render a single frame on the screen because there are more things to take into account (mesh, textures, everything). That's why additional copies of the mesh still causes lower framerates, why heavy mesh is Bad, and why "just buy more RAM" isn't a solution after a certain point.

Larger textures can also take longer to draw onto the screen, but I don't know if that's the case with SL. (It depends entirely on how the code is written.)

When you start running out of memory, the problems just get worse because now instead of just "drawing an image," your computer has to spend time figuring out which textures it can discard, and possibly load new ones from the (relatively much slower, even SSD) hard drive. 

VRAM stands for "video memory," or "Video Random Access Memory" if you really wanna spell it out. It's the amount of memory needed specifically from the graphics card, not just the regular RAM that your processor uses. When you create copies of an object, it needs to be stored somewhere so information about it can be tracked (location, scale, rotation, etc) and sent to the graphics card. So for every copy of an object, there is some memory cost even if the mesh and textures were "100% all shared." Otherwise you'd only render one thing, or all of the things identically on the same place.

* 3.6 million triangles is not hard to reach, considering how Bad most mesh content is (especially as attachments). Your naked mesh body alone can put you halfway to your first million, or more. (Looking at you Legacy...) It has become more and more commonplace to see a single avatar reach the million-mark, I would even call it the norm.

Edited by Wulfie Reanimator
  • Like 2
  • Thanks 4

Share this post


Link to post
Share on other sites
1 minute ago, Wulfie Reanimator said:

You made me do it.

   Smirks deviously. 

2 minutes ago, Wulfie Reanimator said:

It's a little more nuanced than that.

   Thanks! 🔶(t'was the closest to a heart I could find!)

  • Like 1

Share this post


Link to post
Share on other sites

@Wulfie r

4 hours ago, Wulfie Reanimator said:

You made me do it.

It's a little more nuanced than that.

Let's say you're trying to render a scene with a simple cube in it. 6 sides, 2 triangles per side, 12 triangles. Let's ignore the texture on it.

Rendering one on the screen is fine. Creating 300'000 copies of that cube would mean that your computer would have to sort 3.6 million triangles* (to determine which ones are facing the camera, or behind other triangles) and then put pixels on the screen one by one. Depending how the code is written, the same pixel might be drawn-over multiple times.

Infinite memory still means your computer has to spend time doing many more calculations before generating an image. This is what causes your framerate to drop. It simply takes longer to render a single frame on the screen because there are more things to take into account (mesh, textures, everything). That's why additional copies of the mesh still causes lower framerates, why heavy mesh is Bad, and why "just buy more RAM" isn't a solution after a certain point.

Larger textures can also take longer to draw onto the screen, but I don't know if that's the case with SL. (It depends entirely on how the code is written.)

When you start running out of memory, the problems just get worse because now instead of just "drawing an image," your computer has to spend time figuring out which textures it can discard, and possibly load new ones from the (relatively much slower, even SSD) hard drive. 

VRAM stands for "video memory," or "Video Random Access Memory" if you really wanna spell it out. It's the amount of memory needed specifically from the graphics card, not just the regular RAM that your processor uses. When you create copies of an object, it needs to be stored somewhere so information about it can be tracked (location, scale, rotation, etc) and sent to the graphics card. So for every copy of an object, there is some memory cost even if the mesh and textures were "100% all shared." Otherwise you'd only render one thing, or all of the things identically on the same place.

* 3.6 million triangles is not hard to reach, considering how Bad most mesh content is (especially as attachments). Your naked mesh body alone can put you halfway to your first million, or more. (Looking at you Legacy...) It has become more and more commonplace to see a single avatar reach the million-mark, I would even call it the norm.

So if I am understanding this, the 22 lamps, in my fun example - are technically only "from a texture" standpoint impacting me "once".   But the mesh rendering is well all that stuff above (ha) thank you for putting all the info it does help!

It's a little confusing because the VRAM on Firestorm shows 22 instances too.  So it's hard to tell what the total VRAM is with a static screen at any moment.  Based on if calculations are then happening to negate instances of the same textures.    They even showed up on the VRAM when they were not in my direct camera vision (confusing me further).

I did think (and I could be wrong) that unless the items are linked/joined as one mesh item it actually treated them as separate.  I remember one thread discussing this (I can't find it now) i.e. if the same texture is used twice on one mesh item - it counted as one but if different mesh instances  (same texture) it counted as separate so both used VRAM.  

I am not that au fait with the viewer side of things....   so have probably confused myself even further now!!
 

Edited by Charlotte Bartlett

Share this post


Link to post
Share on other sites
5 hours ago, Charlotte Bartlett said:

I am not that au fait with the viewer side of things....   so have probably confused myself even further now!!

It's okay, I rarely read the viewer source too (hopefully one day I'll be fluent enough on C++ to do that), but I have a lot of "general knowledge," some practical knowledge, and the benefit of reading a lot of discussions specific to SL

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...