Register for your free account! | Forgot your password?

You last visited: Today at 13:39

  • Please register to post and access all features, it's quick, easy and FREE!


Monster Lag

Discussion on Monster Lag within the CO2 PServer - Discussions / Questions forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2011
Posts: 141
Received Thanks: 10
Question Monster Lag

Hello, everyone.

I wonder what can cause LAG while using the Scatter skill while the players are hunting. It's as if the monsters die one by one. Is there a solution to this?

Thanks



littlechris95 is offline  
Old 04/02/2019, 01:48   #2
 
elite*gold: 12
Join Date: Jul 2011
Posts: 7,254
Received Thanks: 3,518
Quote:
Originally Posted by littlechris95 View Post
Hello, everyone.

I wonder what can cause LAG while using the Scatter skill while the players are hunting. It's as if the monsters die one by one. Is there a solution to this?

Thanks
I would start by using a few C# stopwatches or the performance monitor in Visual Studio. Debug the server and see how long it takes for scatter. Then, see where it's spending the most time and optimize that, or let us know and we can maybe give you a few pointers.


Spirited is offline  
Thanks
1 User
Old 04/02/2019, 07:12   #3
 
elite*gold: 0
Join Date: Nov 2011
Posts: 141
Received Thanks: 10
Exclamation

I did some tests and I took advantage and made a video so that you can understand better.

Video:



Image:
littlechris95 is offline  
Old 04/04/2019, 23:30   #4
 
elite*gold: 0
Join Date: Nov 2011
Posts: 141
Received Thanks: 10
anyone?


littlechris95 is offline  
Old 04/05/2019, 03:20   #5
 
elite*gold: 12
Join Date: Jul 2011
Posts: 7,254
Received Thanks: 3,518
Quote:
Originally Posted by littlechris95 View Post
anyone?
Quote:
Originally Posted by Spirited View Post
I would start by using a few C# stopwatches or the performance monitor in Visual Studio. Debug the server and see how long it takes for scatter. Then, see where it's spending the most time and optimize that, or let us know and we can maybe give you a few pointers.
As I said... debug the server using stopwatches or the performance monitor and see what's taking the most time. What do you expect us to do? Look into a crystal ball and tell you why your code is slow? We don't have the code, you do. You need to step through your attack method and see what is causing the issue.
Spirited is offline  
Thanks
1 User
Old 04/05/2019, 11:01   #6
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,688
Received Thanks: 879
I'm going to make a wild guess and say that you're locking up your main thread whenever you have to perform an action towards multiple entities.

Your "screen" implementation on the server is probably broken.
Super Aids is offline  
Old 04/05/2019, 22:54   #7
 
elite*gold: 0
Join Date: Nov 2011
Posts: 141
Received Thanks: 10
Quote:
Originally Posted by Super Aids View Post
I'm going to make a wild guess and say that you're locking up your main thread whenever you have to perform an action towards multiple entities.

Your "screen" implementation on the server is probably broken.
If I give you the project I use as a basis, can you tell me what the problem is? Why I've reviewed this source, tested many things and so far no success...

I can pay someone to fix this for me. Anyone willing? Who could provide this service?
littlechris95 is offline  
Old 04/08/2019, 08:25   #8
Moderator

 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,036
Received Thanks: 703
Just get any profiler really and use it to identify the bottleneck in your code. It was already mentioned - it's probably blocking, so either it's doing far too much stuff (most likely) or the operation is really expensive and should be either chopped up or sideloaded to a worker or something. There's multiple approaches to this and you need to choose what to use that fits your source.

TL;DR; - Profile
KraHen is offline  
Old 04/08/2019, 08:40   #9
 
elite*gold: 12
Join Date: Jul 2011
Posts: 7,254
Received Thanks: 3,518
Quote:
Originally Posted by KraHen View Post
Just get any profiler really and use it to identify the bottleneck in your code. It was already mentioned - it's probably blocking, so either it's doing far too much stuff (most likely) or the operation is really expensive and should be either chopped up or sideloaded to a worker or something. There's multiple approaches to this and you need to choose what to use that fits your source.

TL;DR; - Profile
I know what the problem is, it's really obvious if you watch the video. I'm just trying to help him get there. Just stepping through the code that does scatter is enough to figure it out. I kinda wish he'd put more effort into this, because right now my guess is that he hasn't even read the function that does this. If he could suggest a line or bit of the function he thinks it is, then that'd be a good start.
Spirited is offline  
Thanks
1 User
Old 04/08/2019, 13:08   #10
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,688
Received Thanks: 879
Quote:
Originally Posted by Spirited View Post
I know what the problem is, it's really obvious if you watch the video. I'm just trying to help him get there. Just stepping through the code that does scatter is enough to figure it out. I kinda wish he'd put more effort into this, because right now my guess is that he hasn't even read the function that does this. If he could suggest a line or bit of the function he thinks it is, then that'd be a good start.
I did help him in private messages though so I guess that's why he hasn't answered.
Super Aids is offline  
Old 04/08/2019, 17:50   #11
 
elite*gold: 0
Join Date: Nov 2011
Posts: 141
Received Thanks: 10
Quote:
Originally Posted by Super Aids View Post
I did help him in private messages though so I guess that's why he hasn't answered.
I have followed you as tips that you gave me. I compared the codes I'm dealing with, but I have not seen so much change like that. I still have this lag. I took some photos of the codes I'm using:

Codes

* I believe I'm on the right track, but still a bit confused.
littlechris95 is offline  
Old 04/08/2019, 17:59   #12
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,688
Received Thanks: 879
Quote:
Originally Posted by littlechris95 View Post
I have followed you as tips that you gave me. I compared the codes I'm dealing with, but I have not seen so much change like that. I still have this lag. I took some photos of the codes I'm using:

Codes

* I believe I'm on the right track, but still a bit confused.
In Image 2 get rid of the "Spells.ToArray()" and just loop over Spells.Values if anything.

Also it doesn't matter if you pass the Spells as a concurrentqueue because it's never used in threading.

In fact it looks like you tried to solve it in the wrong location.

In Image 3 I have no idea what you're trying to solve but the whole making a big array thing and sending that in chunks doesn't work the way you think.

AFAIK you're supposed to have a limit of targets anyway so it's pointless.

Cba to explain why the rest of the images doesn't work but the whole thing looks really terrible.
Super Aids is offline  
Old 04/08/2019, 21:25   #13
Moderator

 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,036
Received Thanks: 703
Did you profile the code to identify the bottleneck? If you can't measure if, you generally can't improve it either. Especially since you don't know the root cause.
KraHen is offline  
Old 04/11/2019, 23:16   #14
 
elite*gold: 0
Join Date: Nov 2011
Posts: 141
Received Thanks: 10
I have worked hard to solve, but so far unsuccessful. I looked at other projects to compare some things and they are quite similar ... I honestly do not know what else might be causing this :/
littlechris95 is offline  
Old 04/12/2019, 04:19   #15
 
elite*gold: 12
Join Date: Jul 2011
Posts: 7,254
Received Thanks: 3,518
Quote:
Originally Posted by littlechris95 View Post
I have worked hard to solve, but so far unsuccessful. I looked at other projects to compare some things and they are quite similar ... I honestly do not know what else might be causing this :/
Clue: Look for thread sleeps.


Spirited is offline  
Thanks
1 User
Reply



« WarDrobe Remove | Hiring Developers and Modders »

Similar Threads
KerKava LAG LAG LAG!
01/04/2012 - DarkOrbit - 11 Replies
anyone here know how to fix the big lag in Kerkava.? :(
[NOTE] Lag Elimination Campaign: Help Us Solve the Lag!
04/05/2010 - Combat Arms - 6 Replies
Attention Soldiers, We are very well aware of the problems all of you Soldiers had to go through after the 10.02.10 patch, and we are going to launch a full-force investigation to resolve the lag issue. In order to accomplish this task we need more information on your PCs, especially your ‘dxdiag file’ from those who are experiencing lag while playing the game. Please follow the steps listed below to generate your dxdiag file and send that file to [email protected] Your...
lag lag lag
05/30/2008 - Conquer Online 2 - 0 Replies
is there any1 else on babyicey or any server 4 that matter thats been haveing a lag issue, it drivin me crazy i always lagging it makein me not want 2 play{i have dsl and a wireless but i dont think thats it i used 2 borrow a signle that was weak and i had less lag. ty not so much of a question more cryin then question. is it all the useless features or r they just lazzy



All times are GMT +2. The time now is 13:39.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 3KeUpz52VCbhmLwuwydqxu6U1xsgbT8YT5
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.