-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Change navigation map performance monitor to use a struct #99626
Conversation
Changes navigation map performance monitor to use a struct as it is easier to pass to sub functions.
@@ -298,6 +298,19 @@ class Heap { | |||
} | |||
} | |||
}; | |||
|
|||
struct PerformanceData { | |||
int pm_region_count = 0; |
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.
If the struct is called "performance_data" why are all members still prefixed with pm
, which I assume means "performance"?
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.
I had the prefix originally removed but reverted and added it back in. Without that prefix it turns the code readability into a shitshow when you dont have a more sophisticated IDE as your mental crutch available. There are so many similar temp variables all over the place in sub functions that can be easily confused and the pm_ prefix makes it very clear what is what.
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.
I agree with @Mickeon - as the fields are always prefixed with [name].
it's possible to have good readability without that pm_
prefix
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.
Code looks good to me.
Thanks! |
Changes navigation map performance monitor to use a struct as it is easier to pass to sub functions.
It is impossible to split that giant map sync function with so many properties that would need to be passed to sub functions individually.