-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profiling based improvements #1115
Conversation
@@ -1315,7 +1315,7 @@ public static void HandleShowStats(Session session, params string[] parameters) | |||
var specialized = player.Skills.Values.Where(s => s.AdvancementClass == SkillAdvancementClass.Specialized).OrderBy(s => s.Skill.ToString()); | |||
var trained = player.Skills.Values.Where(s => s.AdvancementClass == SkillAdvancementClass.Trained).OrderBy(s => s.Skill.ToString()); | |||
var untrained = player.Skills.Values.Where(s => s.AdvancementClass == SkillAdvancementClass.Untrained).OrderBy(s => s.Skill.ToString()); | |||
var unusable = player.Skills.Values.Where(s => s.AdvancementClass == SkillAdvancementClass.Inactive).OrderBy(s => s.Skill.ToString()); | |||
var inactive = player.Skills.Values.Where(s => s.AdvancementClass == SkillAdvancementClass.Inactive).OrderBy(s => s.Skill.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be displaying unusable skills
@@ -422,7 +422,7 @@ private static IEnumerable<WorldObject> HandlePhysics(double timeTick) | |||
|
|||
private static void HandlePhysicsLandblock(Landblock landblock, double timeTick, ConcurrentQueue<WorldObject> movedObjects) | |||
{ | |||
foreach (WorldObject wo in landblock.GetPhysicsWorldObjects()) | |||
foreach (WorldObject wo in landblock.GetWorldObjectsForPhysicsHandling()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetWorldObjectsForPhysicsHandling() should be removed entirely
this should just be:
foreach (var wo in landblock.WorldObjects.Values), assuming the places that access it have exclusive access
Creating a duplicate list of every WO in every landblock 30-60x per second, vs. just iterating through the existing list of WOs...
Both issues have been addressed. For the unusable skills, they're still in the untrained state, so they're displayed with that list. They now just have the [Unusable] tag added to the end. They are sorted in the order as they appear in the client. |
Bow: 0 These skills are showing up in Player.Skills as 'untrained', instead of 'inactive' |
Removed the last reflection based skill lookups. Now all skill lookups go through the portal.dat
This reduces CPU demand by about 2% or more.
Removed the legacy attributes for Skill/PropertyAttribute2nd. These were to allow us to define these enum values with meta data before when we weren't loading the data from the portal.dat. Now that the data comes from the portal.dat, we do not need these. They are being removed to avoid confusion.
Removed the PhysicsObj != null check for the Landblock.GetPhysicsWorldObjects().
This reduces CPU demand by about 6%.