What is the bottleneck impacting servers?

OneEyedOneEyed Join Date: 2003-03-14 Member: 14493Members
edited November 2012 in Server Discussion
The items that may impact server performance at the highest level are:
<ul><li>Lua Binding</li><li>Gameplay Code</li><li>Physics</li><li>Ray Tracing</li><li>Network Processing</li></ul>

I have been looking for bottlenecks in the gameplay code, and one thing that keeps popping up is loops. Loops everywhere. For example.... The library method "Shared.GetEntitiesWithClassname" is called an insane amount of times. As the name suggests, this returns a list of all entities that have a certain Classname. I don't have access to the library code that contains the GetEntitiesWithClassname method, so I can't say anything about the code. However, this is a function that should definitely have a big O(1) run-time, if optimized correctly with hash tables.

In the math category, a good optimization would be to remove the Square Root calls in Vector Distance checks.

These are just some of the optimizations that can be done to the gameplay code. I can't really critique the other high level items, as I do not have access, but hopefully, this can begin the start of a real discussion on isolating and killing these performance gremlins for the dev team.

Comments

  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    The server supports the profiler you know. Open the console and type 'profile'. Having actual numbers of where all the processing is going is going to work a lot better then just digging randomly through the code and trying to guess at what needs optimizing.
  • OneEyedOneEyed Join Date: 2003-03-14 Member: 14493Members
    edited November 2012
    <!--quoteo(post=2014514:date=Nov 7 2012, 06:04 PM:name=devicenull)--><div class='quotetop'>QUOTE (devicenull @ Nov 7 2012, 06:04 PM) <a href="index.php?act=findpost&pid=2014514"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The server supports the profiler you know. Open the console and type 'profile'. Having actual numbers of where all the processing is going is going to work a lot better then just digging randomly through the code and trying to guess at what needs optimizing.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Ahh, thanks! I just started messing with everything a few days ago, so still learning.
Sign In or Register to comment.