|
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.
So basically spend most of your time optimizing the main code of your server that runs majority of the time?
Very nice tips. Can you go in-depth about how to optimize your programming?
very good and thank god you threw in that last bit at the end
otherwise it would have been really pointless lolSo 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.
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)
It's not JUST player updating Blake, it's updating in general. NPC update is done the same horrible way.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |