Skip to content

Commit

Permalink
We can optimize a significant portion of LookClose's findNewTarget me…
Browse files Browse the repository at this point in the history
…thod with some changes: (#2103)

-Build the list of all potential Players and THEN sort by distance. A good chunk of the method's time was spend sorting things it didn't need to.
-Second, reorder the player checks for best performance, where getNPC() is the cheapest check and isPluginVanished is the most expensive check.

In somewhat minimal testing, these changes almost dropped findNewTarget off of my profiling entirely
  • Loading branch information
Cryptite committed Apr 13, 2020
1 parent 09f7cbb commit fe02492
Showing 1 changed file with 235 additions and 233 deletions.
Loading

0 comments on commit fe02492

Please sign in to comment.