ID:2225125
 
BYOND Version:510
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Chrome 56.0.2924.87
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:

This is for BYOND 511

Something you've done in the last few months to statpanels has made it so displaying a list of say, 10 mobs in the statpanel, will lag the CLIENT heavily.
In Dragon Universe, when we display a list of mobs in a statpanel (for our "sense" tab, which lets a player detect all other players on a map) it lags the client greatly, and by that I mean it lowers their framerate to be very choppy and unsmooth gameplay. I don't mean just a little, it becomes almost unplayable. The server does not lag, this only affects the client. It is not something I've done to Dragon Universe's code either because I barely update anymore. It just popped up out of nowhere with recent BYOND updates.

Numbered Steps to Reproduce Problem:
I don't know, just try this code and make sure it is filled with like 15 mobs and preferably they should have some clothes/hair overlays, like say, 3-4 "clothing" overlays and 1 hair overlay on each mob. Then try running around in the game and you should see that it is extremely choppy, but if you switch to another statpanel then you will be fine. This may only work if you are a remote player not the host. Dragon Universe has 20 server fps and 100 client fps.

Code Snippet (if applicable) to Reproduce Problem:
mob/Stat()
if(statpanel("Mobs"))
for(var/mob/m in some_list_of_mobs)
stat("[get_dist(src,m)]", m)


Expected Results:
It didn't "lag" before so it shouldn't now.

Actual Results:
It "lags" the client to view the tab which displays a set of players

Does the problem occur:
Every time? Or how often? Yes
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur?
When you use BYOND 510

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
510

Workarounds:
Use 510

Thanks.
If you really want to lag badly try displaying 100 mobs like our "Who" statpanel does. It used to work just fine before but now you will only get 1 frame every 3 seconds. Meanwhile the server runs just fine.

Even displaying one mob (actually objs lag too, but mobs seem much worse) creates a noticeable slow down, and puts you to what feels like 4 fps
I'll see what I can find.

It would help a lot if you could narrow down which 511 version this appeared in. Also I'm still waiting for a test case for the movement issue.
Sorry but I've been inactive for like 6 months so I have no idea which specific 511 version did it.
You can download old versions here:

http://www.byond.com/download/build/511

Just download the zip, call the directory byond511.1360 or whatever, and give it a try. If the problem persists, then the change was in that build or earlier; if the problem goes away, it was in a later build. In that way you should be able to narrow it down.
I tried to replicate this in my test project. Here's the code I used:

// Tens of DU statpanel issue
world/fps = 20
client/fps = 100
mob/var/list/tensmobs
mob/Login()
..()
tensmobs = new
if(world.maxz < 2) world.maxz = 2
var/list/olays = new
var/obj/O = new
O.layer = FLOAT_LAYER
O.icon = 'blah.dmi'
olays += O.appearance
olays += O.appearance
olays += O.appearance
olays += O.appearance
for(var/i in 1 to 20)
var/mob/M = new(locate(1,1,2))
M.overlays = olays
walk_rand(M)
tensmobs += M
mob/Stat()
..()
if(statpanel("Tens Bug"))
for(var/mob/M in tensmobs)
stat("[M.x],[M.y],[M.z]", M)

I added multiple overlays to 20 mobs and set them walking. The overlays are also a different icon size, 16x16 rather than 32x32, which if anything would complicate matters--but I also tested with a 32x32 blank icon. Also, in case alpha blending might be in play as part of this, I tried using an overlay that was translucent.

I was not able to reproduce your issue at all. Performance looked like it might be slightly down while the statpanel was in view, but not by a lot, and it never bogged down at all.

Suffice it to say I very much need a test case for this, because the test case I tried to make did not work. So I need a test case for this, as well as the arrow key issue you talked about in the Beta Testers forum.
I just found out this only happens on DU's most popular server (the one with 100 players on average). With 100 players it maintains a stable 8-12% world.cpu so it isn't the server straining. But if the player count falls to like 35 players the problem stops. But with 80+, simply viewing just 1, 2, or 3 mobs in a statpanel will cause a massive fps drop.

If the other servers were capable of hitting 80+ players maybe it would happen there, I can't say. Not trying to send you on a wild goose chase though
The thing is, the client's speed should not be impacted by the number of players. That part doesn't make sense, because the client doesn't have to juggle those users. Whatever client-side FPS drop might be experienced by looking at mobs in a statpanel, it should be identical whether there are 100 players or 1 player.

If a test case is not feasible to provide for this, then it is all the more important that you can narrow down the version where this problem first appeared. That info could potentially give me something to go on. Right now I have no data I can use to investigate.
world/fps = 20
client/fps = 100
mob/var/list/tensmobs
mob/Login()
..()
if(client)
tensmobs = new
if(world.maxz < 2) world.maxz = 2
var/list/olays = new
var/obj/O = new
O.layer = FLOAT_LAYER
O.icon = 'blah.dmi'
olays += O.appearance
olays += O.appearance
olays += O.appearance
olays += O.appearance
for(var/i in 1 to 125)
var/mob/M = new(locate(1,1,2))
M.overlays = olays
walk_rand(M)
tensmobs += M
mob/Stat()
..()
if(statpanel("Tens Bug"))
for(var/mob/M in tensmobs)
stat("[M.x],[M.y],[M.z]", M)


No lag with this. Beta 511.1375.
It only starts happening if you have been online like 1+ hours. Like a memory leak or something I don't know. Then if you fully exit Dreamseeker and come back it is fine again. Slows to a crawl til then. All players on DU get it. Even my gaming PC
Perhaps you could build a test case where there are multiple possible icons for Dream Seeker to display in the statpanel, and that they change every time the statpanel updates. If it's a matter of the internal cache of "built" icons getting big, that should show it up. Maybe this only happens on large servers because users are exposed to more changing icons in their statpanel.
TBH, Tens, I've noticed the issue on my server too..ESPECIALLY when using Who tab. It's almost as bad as Build tab sometimes. But as soon as I click Stats tab, it goes away completely. Dunno if that helps. :s
It should be noted, my server averages around 20-30 players, so....not a numbers thing, i dont think.
Blitz, if you can narrow down a version where this started happening, that would be an enormous help. My attempts to reproduce this have failed utterly.

Also, can you confirm any of the following?

- Only happens on the client end
- Only happens after a period of time
- Reconnecting fixes it
also, i didn't notice a full 511 byond version this is confirmed to trigger on, as a start that info might be helpful incase it got fixed in a later version.

6 months of 511 fixes could have easily fixed or even just accidentally mitigated this issue.
I'll work on it, sure thing Lummox! I know that on my end, the lag begins almost INSTANTLY upon clicking the Who tab OR the Build Tab. Sometimes, something simple such as clicking on a person, which should open a tab on that person's stats, lags to hell.

I know when I hide tabs, or when I go to a tab without icons, such as Stats, the lag completely disappears. I know it's been going on for awhile now with the Build tab, but as for Who, not positive. Within the last year, for sure.

I've also never had anyone complain about lag when I, the host, am lagging out from it. So...if I ventured an educated guess:

-yes
-Instant
-Dream Seeker does not respond when it is happening, so reconnecting seems impossible to initiate.
Blitz, since this happens just about instantly and it happens with your Build tab, do you also think it'd be feasible for you to pare this down into a test case?
I wish I knew how to do that exactly...but if you're willing to help me through it, I'm more than willing to help! Anything to help improve the game ^_^
Basically it's a matter of making a copy of your project and paring it down to the essentials to show the bug. So for instance the build tab and the icons in it would be necessary, but probably not any significant login/character creation stuff, combat, chat, etc.

Even using your existing project but adding a quick way to get to a point where the build tab could be seen and used, bypassing any login and creation stuff, would be fine. That's often a good way to go with things like this.
I havent got the source code, only host files, sadly. However, I'll make records of everything I do and report back
Page: 1 2