Thread: Are you planning to optimize your server code for performance? Read this first!

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 Are you planning to optimize your server code for performance? Read this first! 
    brb ridin da storm

    blakeman8192's Avatar
    Join Date
    Dec 2012
    Age
    31
    Posts
    2,012
    Thanks given
    818
    Thanks received
    1,361
    Rep Power
    329
    Before you set out on a crusade to speed up your server code (aka optimizing it), take in mind the Pareto Principle.

    The Pareto Principle can be applied to software code. How? It's this simple: chances are that 20% of your code will be running 80% of the time.

    The Numbers
    Let's break it down.

    Optimizing the other 80% of your code
    If you improve server performance in that other 80% of the code by 25%, you will only improve overall server performance by 5% once the Pareto Principle is applied.

    Optimizing the important 20% of your code
    If you improve server performance in the 20% of the code by 25%, you improve overall server performance by 20% once the Pareto Principle is applied.

    A 100% increase (aka doubled) in performance for the other 80% of code will only improve overall server performance by 20%
    A 100% increase (aka doubled) in performance for the important 20% of the code will improve overall server performance by 80%.

    This is important. Don't waste your time optimizing code for nothing.

    So what is the important code?
    The most important code (the 20% of the code that runs 80% of the time) would be player updating and networking. Focus on optimizing those parts of your server if you want to see real changes in performance.
    rest in peace Qemist, Izzy, Colton, TeChNo PuNk, Impulser, & bootnecklad
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    isAwesome = true;
    Typhoeus's Avatar
    Join Date
    Nov 2008
    Posts
    815
    Thanks given
    18
    Thanks received
    13
    Rep Power
    246
    So basically spend most of your time optimizing the main code of your server that runs majority of the time?
    Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction.
    - Albert Einstein

    It is one thing to show a man that he is in an error, and another to put him in possession of the truth.
    - John Locke
    Reply With Quote  
     

  4. #3  
    brb ridin da storm

    blakeman8192's Avatar
    Join Date
    Dec 2012
    Age
    31
    Posts
    2,012
    Thanks given
    818
    Thanks received
    1,361
    Rep Power
    329
    Quote Originally Posted by Typhoeus View Post
    So basically spend most of your time optimizing the main code of your server that runs majority of the time?
    Yes, and that would be player updating.
    rest in peace Qemist, Izzy, Colton, TeChNo PuNk, Impulser, & bootnecklad
    Reply With Quote  
     

  5. Thankful users:


  6. #4  
    Endeavor

    Mikey`'s Avatar
    Join Date
    Dec 2007
    Posts
    4,434
    Thanks given
    715
    Thanks received
    1,435
    Rep Power
    1202
    Very nice tips. Can you go in-depth about how to optimize your programming?
    Reply With Quote  
     

  7. #5  
    brb ridin da storm

    blakeman8192's Avatar
    Join Date
    Dec 2012
    Age
    31
    Posts
    2,012
    Thanks given
    818
    Thanks received
    1,361
    Rep Power
    329
    Quote Originally Posted by Mikey` View Post
    Very nice tips. Can you go in-depth about how to optimize your programming?
    Most of it is all just on a case-by-case basis, and using proper design patterns (such as the flyweight pattern, etc.)
    rest in peace Qemist, Izzy, Colton, TeChNo PuNk, Impulser, & bootnecklad
    Reply With Quote  
     

  8. #6  
    Are you planning to optimize your server code for performance? Read this first!



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    This is awesome, thx blake.

    Attached image
    Reply With Quote  
     

  9. #7  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    very good and thank god you threw in that last bit at the end

    So what is the important code?
    The most important code (the 20% of the code that runs 80% of the time) would be player updating and networking. Focus on optimizing those parts of your server if you want to see real changes in performance.
    otherwise it would have been really pointless lol

    to expand on this slightly, npc aggression in many servers is also done quite badly, something that is defently worth improving. (In most servers its all npcs looping all players so 2000 npcs * 100 players makes it quite a large process)
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
    Reply With Quote  
     

  10. #8  
    Banned
    Join Date
    Jul 2009
    Posts
    383
    Thanks given
    4
    Thanks received
    9
    Rep Power
    0
    It's not JUST player updating Blake, it's updating in general. NPC update is done the same horrible way.
    Reply With Quote  
     

  11. #9  
    Chemist

    Advocatus's Avatar
    Join Date
    Dec 2009
    Posts
    2,622
    Thanks given
    201
    Thanks received
    813
    Rep Power
    1462
    might look into this, no idea how to utilize it though, i guess its back to the sun forums. (like colby).
    Quote Originally Posted by blakeman8192 View Post
    Quitting is the only true failure.
    Reply With Quote  
     

  12. #10  
    Registered Member
    craig903's Avatar
    Join Date
    Sep 2007
    Age
    30
    Posts
    1,357
    Thanks given
    14
    Thanks received
    92
    Rep Power
    238
    Visit Rune Miracle Here
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •