Cache color#303
Conversation
|
Caching colors for the effects is fine, but doing that for the debug overlays is unecessary given that debugging is not always active in normal gameplay, and it just ends up using more memory. It shouldn't be done on Also there's no need to cache colors on functions that were using separate RGBA components ( I've seen some related pull requests that you've opened, and I'd like you to consider this before doing them: How likely is a section of code to be running constantly?You don't have to cache stuff for things that run on very specific circumstances, like the Repair SWEP HUD, the Engine Stream editor, or Lastly, try to avoid using existing color constants that GLua added, since I have seen some addons modifying it accidentally. (In other words, do not use |
I actually checked the GLide source code and I didn't see the crosshair that changes color unless you're talking about other addons.
If you say so, I think the principle of color caching must also have been in SetDrawColor
I agree about the Regarding debug colors, why not create a global table that is only activated if the server has a
Yes, some addons use and modify the |
Yes I am.
Using the separate RGBA components like I said would've been better for performance, and completely negate the need to cache the colors in the first place. Some of those
The Engine Stream editor never did that, until you replaced the
That's a unecessary complication for, once again, something that is never activated in regular circumstances. |
Just a color cache