Closed wolfestridershooter closed 7 months ago
https://github.com/wiremod/wire/pull/2576
This PR detours RenderHalos so presumably why there's lag
@stepa2
detouring it won't produce lag... It's just calling https://github.com/Facepunch/garrysmod/blob/87aa68cb8da3d70e6e7265bc61ca222c55e3f8e5/garrysmod/lua/includes/modules/halo.lua#L147 which is historically known to be a very costly function
Detouring will absolutely produce lag.. especially since it runs hook.Run beforehand, and the hook library is not as fast as it could be.
Maybe the addon he's using is just marking wire as the cause of the halo lag, but still, detouring will add overhead esp to a render hook
The script is just profiling hooks so yeah, it's identifying the wire hook which calls garry's hook, to be the culprit. This PR tried to improve its performance but didn't work https://github.com/Facepunch/garrysmod/pull/1590
It's not wire's problem that gmod's halo system is very costly.
I think there's a convar to disable halos btw. Don't remember tho. Or it's just to disable the physgun halos.
Describe the bug: While trying to find what was causing me performance issues in Garry's Mod by using Addon hooks Lag Finder I found this:
Sure enough when I disabled Wiremod I gained FPS in an idle scenario. My guess is that this code renders the Halo effect that shows when you look at a wire entity, but if we have no wire entities on the map why are we running this? I don't know maybe I'm completely wrong and there is a good reason why it's being done.
To Reproduce Steps to reproduce the behavior:
Expected behavior: To not lose FPS when not using Wire entities