i think i found the lag problem

Old stuff, just for reference

Moderator: Joe M.

i think i found the lag problem

Postby ascent » Thu Sep 25, 2008 3:12 am

some testing this morning, i decided to coutnt monsters until i lagged, i ended up getting to 27 then the number started goin down

yet once i left screen n walked back, there were all 27, so l believe that lag is due to monsters appearing to the server and not to the player (basically its from to many polys on screen at once for the client to handle)
ascent
Traveler
Traveler
 
Posts: 80
Joined: Tue Sep 02, 2008 12:08 pm

Re: i think i found the lag problem

Postby Sankt Pauli » Thu Sep 25, 2008 10:26 am

It could be the polycount but that would mean the 'lag' gets produced client-side and not server-side since i don't think the server draws any graphical content "on itself".
I don't think the lag derives from graphical issues on the clients pc though, because the monsters are actually still moving smoothly on-screen, the own character just doesn't respond. I think karl said it had to do with the way how monsters spawn, i don't really remember that though.

Overall the lag-problem has become MUCH better though, especially if you consider the pretty much insane spawn that you can find (i found a place with basically instant spawn, only novice and apprentice skellys but the xp is pretty awesome).
Sankt Pauli
Sheriff
Sheriff
 
Posts: 167
Joined: Mon Sep 03, 2007 9:48 am
Location: Germany

Re: i think i found the lag problem

Postby ascent » Thu Sep 25, 2008 3:23 pm

well the reason i say its because of the poly's is because last night i showed karl of a spot with massivly overspawned monstrosities (there was literally hundreds) and you could only see like 15 of them tops, then youd kill them and more would pop up on ur screen (if you could kill them lol) and youd stop moving no matter what lol karl was like "OMG WTF" so yea, and i never meant its server side lag, because i knwo its client side, but the only thing i havnt figured, sometimes itll lag when theres only 1 monster on my screen, causing me to die from 1 troll -.- not very fun... but thats only rarely so i honestly dont know


and server sided lag would mean monsters would lag too (if u remember in xen) in xen when server lagged bad, so did the monsters, but when u got client lag, the monsters didnt lag at all, so i assume it would be the same concept over here, (or pretty much any game)
ascent
Traveler
Traveler
 
Posts: 80
Joined: Tue Sep 02, 2008 12:08 pm

Re: i think i found the lag problem

Postby Karl G. » Thu Sep 25, 2008 7:36 pm

So I did some more code profiling and found the source of a "jitter". I'm using this term instead of "lag" here because lag to me means a delay during which changes you make on the client aren't reflected on the server--the client is running fine (characters animating and whatnot), but nothing changing/responding. A "jitter" however is a complete client-side lock up for a short amount of time while something happens. I've found the latter.

The problem is when the client loads a new section of the map. When loading the map, the client builds up the geometry for that section and makes a lot of allocations--I found that loading a new segment took around 0.16 seconds, or the equivalent of ~10 frames of rendering--which is very noticeable! Compound that with the fact that everything on screen will "jump" during this time, that makes for quite a jolt. I'm working on "sliding" in new sections of the map little-by-little so that it doesn't have such a drastic effect.



That said, the responsiveness problem you're having (and I've encountered, though very rarely) seems also to be client-side. I think it has to do with the input subsystem choking during a jitter. A whole bunch of messages flood in (a normal app can get a few hundred every second if the mouse is moving) and a buffer somewhere fills up, then starts just dropping new input instead of handling it. I'm thinking that switching to a different kind of input processing will fix this, but that's a challenge for later.

The jist is, there's a way to tell what the error is--but I have to get the error to happen first and as I mentioned, it rarely ever happens on my system. So when 1.10 comes out, remind me to describe to you how to find it.
User avatar
Karl G.
Lesser Spirit
 
Posts: 2453
Joined: Sat Mar 04, 2006 10:26 am

Re: i think i found the lag problem

Postby ascent » Thu Sep 25, 2008 8:24 pm

well karl i can show you the exact spots where i normally get it (theres roughley 3 or 4 spots where i ALWAYS get a jitteR) also with the inputing becoming nonresponcive during a jitter, other things that dont work when a jitter occurs, clicking, (of course any thing that is keyed) and talking all do not work, but i'd like to know, since i didnt fully udnerstand your post, was i on the right track with my findings? (btw the jitters happen more with Trolls, Monstrosityes <-- cuz their bigger and with experts/masters <--cuz theres so darn many)


one way i prevent this problem (personally) is when i know i'm coming up on alot of monsters, i take baby steps, only taking 1-5 monsters at a time, trying to get as little as possible
ascent
Traveler
Traveler
 
Posts: 80
Joined: Tue Sep 02, 2008 12:08 pm

Re: i think i found the lag problem

Postby Burnt Ferret » Thu Sep 25, 2008 8:46 pm

I only get this "jitter" or "lag" when i have something such as a video i'm not watching open in the background. Very rarely have I experienced this when there was nothing running in the background, but yes, it is always when there are at least 15 monsters on the same page.
Burnt Ferret
Sheriff
Sheriff
 
Posts: 120
Joined: Sat Sep 20, 2008 12:34 pm

Re: i think i found the lag problem

Postby ascent » Thu Sep 25, 2008 9:05 pm

it may also be due to the ammount your CPU can handle, i've yet to try evidyon on my laptop cuz i dont have wireless yet (i get it in a fw weeks w00000t)
ascent
Traveler
Traveler
 
Posts: 80
Joined: Tue Sep 02, 2008 12:08 pm

Re: i think i found the lag problem

Postby Karl G. » Fri Sep 26, 2008 6:52 am

ascent wrote:well karl i can show you the exact spots where i normally get it (theres roughley 3 or 4 spots where i ALWAYS get a jitteR)



next time you see me online, show me where
User avatar
Karl G.
Lesser Spirit
 
Posts: 2453
Joined: Sat Mar 04, 2006 10:26 am


Return to Archive (Before Alpha 2)



Who is online

Users browsing this forum: No registered users and 1 guest