Garry's Mod

Garry's Mod

Headcrab Hiding [FPS Fix]
Wesch 5 月 4 日 下午 2:01
Contradictory Performance Impact
Observations:
During profiling, two hooks from this mod caused significant lag:

HH_CheckProps Timer

Impact: 17.35% of server lag

Peak Time: 4,286µs (executed 3 times)

Location: hh_init.lua (lines 31–60)

HH_ShakeProps Timer

Impact: 0.59%

Location: hh_init.lua (lines 62–85)

these timers introduce stutters during execution.

Root Cause:
HH_CheckProps runs expensive prop checks (possibly scanning the entire map).

Frequency vs. Cost: Even though it runs rarely (3 times in 274 frames), each execution is heavy.
最后由 Wesch 编辑于; 5 月 4 日 下午 2:07