Garry's Mod

Garry's Mod

Addon hooks Lag Finder
93 Comments
Cédric GÉRILLE [GiletJaune]  [author] 6 Jun @ 10:17am 
Hey! Thanks for the love! :extralife:
Shimyo 3 Jun @ 5:50pm 
hey so i love u for this
Cédric GÉRILLE [GiletJaune]  [author] 3 Jun @ 11:10am 
I made it specially for you in the first place! 😉
Boing 14 May @ 10:56pm 
this has been very handy, thank you.
Cédric GÉRILLE [GiletJaune]  [author] 2 Jan @ 11:52am 
Greetings!
Your case is a little special. As mentioned in the messages, the errors come from the conflict finder, not the lag finder. Please retry the lag finder after uninstalling the conflict finder. I'm sorry for the inconvenience.
It seems that there is a special case where the conflict finder tries to send information, but for an odd reason, it seems that the information is too large, and that is surprising to me!
Well, good point here: the conflict finder needs to be fixed to handle this special case where there is too much information about the location of Lua files. I did not expect this!
The message about the not found hooks for event "1" does not give me any ideas BTW.
Mr.Toymaker 31 Dec, 2024 @ 9:26am 
It stopped working for me.. it pops me "Could find no hook with event name "1"!

[Addon hooks Conflict Finder] net.WriteData: Invalid length 67602!
1. unknown - lua/autorun/find_conflicts_hook.lua:72
2. pcall - [C]:-1
3. func - lua/autorun/find_laggy_hooks.lua:312
4. unknown - lua/includes/extensions/net.lua:37


[Addon hooks Conflict Finder] lua/autorun/find_conflicts_hook.lua:81: bad argument #1 to 'JSONToTable' (string expected, got no value)
1. JSONToTable - [C]:-1
2. net_ReceiveLuaFiles - lua/autorun/find_conflicts_hook.lua:81
3. func - lua/autorun/find_conflicts_hook.lua:147
4. unknown - lua/includes/extensions/net.lua:37" As i try to do a clientside test..
Cédric GÉRILLE [GiletJaune]  [author] 21 Apr, 2024 @ 1:39am 
"lua/entities/ent_proxsensor/cl_init.lua" is missing. That's all I can tell.
Market Pluh 20 Apr, 2024 @ 2:14am 
[Stealth 2.1 (Improved Stealth Mod)] AddCSLuaFile: Couldn't find 'cl_init.lua'
1. unknown - lua/entities/ent_proxsensor/init.lua:1

where do I find the hook here?
and what do I type in the command?
Cédric GÉRILLE [GiletJaune]  [author] 30 Mar, 2024 @ 1:34am 
Yes! :missing: Thank you!
Lexeychik 29 Mar, 2024 @ 11:38am 
most usefull addon EVER:steamthumbsup::missing::steamthumbsup:
Cédric GÉRILLE [GiletJaune]  [author] 28 Mar, 2024 @ 4:36pm 
God blesses me constantly, yet thanks for the appreciation! xD
I'm very glad to be helpful sometimes. Incompetent but somehow useful. 🤪
It's great that this add-on still works because I have not updated it in ages.
You actually are the good one: you make good use of Garry's Mod. 😁
morphine187 28 Mar, 2024 @ 1:12pm 
Day to day im suffer from stutters, at least i have good fps like 60+ on big maps and 100+ on small. Yeah, i got like 200-300 addons, but people have more and their Gmod runs good. Stutters everything, mostly like from sound caching and do thing that causes small scripts.
And i found this. God bless you, bro. Using your addon, i found these piece of sh*t, that create stutters. Addon called "Catmull-rom Cinematic Cameras". Yeah, thats cool addon that create cinematic cams trails, but this addon is also so unoptimized and calls like 200%+ problems, like you addon says, instead of other 0.1-0.2%.. Now i can play like its minded, create some machinima and avoid to re-recording every moment, that game stuttered. God bless you and your family.. You such a cool and smart man, that helps to people find trash and delete this
Cédric GÉRILLE [GiletJaune]  [author] 7 Dec, 2023 @ 9:22pm 
Well, I don't think that it could help with the memory usage, but I am glad that you could find the add-on that was both laggy and a big memory consumer.
Thanks for the love! ❤
kerklavan 21 Nov, 2023 @ 1:15pm 
I LOVEE YOUU
kerklavan 21 Nov, 2023 @ 1:15pm 
OH MY GOD THANK YOU DUDE YOU HELPED ME FIND A USELESS ADDON THAT WAS LITERALLY USING 2 GIGS OF RAM
Cédric GÉRILLE [GiletJaune]  [author] 4 Aug, 2023 @ 1:24pm 
Was easy mate! Thanks for being my user.
GermanPlasma 3 Aug, 2023 @ 1:19pm 
This tool is so damn useful, you are a KING.
Cédric GÉRILLE [GiletJaune]  [author] 22 Jun, 2023 @ 10:52am 
Thank you Rib!
SuperDean, sadly, the LuaJIT implementation included in Garry's Mod does not seem to have a memory allocation tracing feature, in the same fashion as tracemalloc on Python. Such a feature would have to be enabled through a function or a command line argument, because it involves a performance penalty. I did not see anything like that in Garry's Mod.
Things that do not belong in the Lua world should be monitored too. If you are looking for memory usage issues on the game version of Garry's Mod, then the biggest memory eaters are models and textures, from what I guessed. Maybe fonts could be problematic, particles, sounds? Sadly, Garry's Mod does not make it easy to know what has been loaded.
The server version also seems to load certain things they should not, like material animations for just one random example.
Also a friendly reminder, the game version of Garry's Mod eats way less memory in its 32-bit edition.
SuperDean 4 Jun, 2023 @ 7:39pm 
is there something like that tells you what addons uses up your ramm instead of cpu?
Rib 2 Jun, 2023 @ 12:44am 
Invaluable addon, thank you!
Cédric GÉRILLE [GiletJaune]  [author] 6 Mar, 2023 @ 1:48pm 
Well, if there was no Lua errors at startup then the add-on just was not mounted properly. No update was done in a long time.
Dr. Freehouse 6 Mar, 2023 @ 11:21am 
still works as of now for me
Bophades 6 Mar, 2023 @ 9:04am 
Tried to run this singleplayer an d multiplayer, says "unknown command" in the console.
Cédric GÉRILLE [GiletJaune]  [author] 19 Jan, 2023 @ 11:22pm 
BTW, don't stop the test when there are still players in, because TTT2 would overflow the channel again.
If I'm correct, the test ends when the player who initiated it leaves the server, which makes sense except in this case. It would be cool to reconnect with the test still running. Honestly this is something I should consider doing.
Cédric GÉRILLE [GiletJaune]  [author] 19 Jan, 2023 @ 11:16pm 
Hi, thank you!
Wait, you must have used find_laggy_hooks_sv from the client's console. Have you tried it on the server's console instead? (I don't think it can help when players are present.)
Here is a trick that should work: start the test from the server's console right after a map change, but make sure to do so before any player has finished loading. Of course you can do the same when nobody is connected.
Sadly, I think the only way to fix this from my add-on would be to slow down the startup by adding more and more things to the test instead of immediatly adding everything.
TTT2 might have less complexity in limiting the number of sent messages, but I guess it does not make sense to the creators, even though it's literally the responsible add-on for this issue.

Hehe, I proved again to be incompetent! 🤡
fskin 19 Jan, 2023 @ 4:59pm 
This mod is a great debugging tool. Sadly I found that it doesn't seem to be compatible with the popular TTT2 mod. When it's used, the session crashes due to stack overflow.

"[TTT2] Trying to hotreload weapon_ttt_detective_cube .
[TTT2] Hotreloading weapon_ttt_detective_cube was successful.
[TTT2] Trying to hotreload m9k_striker12 .
[TTT2] Hotreloading m9k_striker12 was successful.
Lag test started, next output in 30 seconds!
Dropped fskin from server (Client 0 overflowed reliable channel.)"

It's due to TTT2's way of announcing the hotreload of every active addon that overflows the console. I'm not sure if it's possible to fix it...
Cédric GÉRILLE [GiletJaune]  [author] 14 Jan, 2023 @ 4:19pm 
Hehe, thank you!!! I created this tool because I could not stand not knowing where lags come from, and I was asked so much if I could inspect servers etc. I'm so glad it's been so useful to many other people! ❤
Thank you all for your heartwarming comments!
Pud 14 Jan, 2023 @ 11:51am 
best. debug mod. EVER. thankyouthankyouthankyou. why this type of function isn't in the base game in some form is beyond me. such a lifesaver, have the silly steam award as a thanks
Cédric GÉRILLE [GiletJaune]  [author] 1 Jan, 2023 @ 11:13am 
Hey Deno,
Wow, this comment is so expressive and super sweet! Thank you very much, I'm so glad I could help you! You too are a gentleman for dropping such a great comment! 🤍
Deno4558 30 Dec, 2022 @ 4:36pm 
I must say kind sir, your addon saved my buttocks. I almost commited punching a frickin hole into my pc, but as I saw your addon that did indeed save me from allot of trouble, I couldnt simply resist but had to write this flabbergasting comment on it. You gentleman are truly a hero because I almost executed all my addons that were innocent. I wish you a very fabulous day.
Cédric GÉRILLE [GiletJaune]  [author] 17 Oct, 2022 @ 12:02am 
Ouch! 😭
Smith Furia 16 Oct, 2022 @ 4:41pm 
people also like fancy text and addon names, with capitals on the name, for example: "Addon Lag Finder", it is simpler but more people will see
Dr. Freehouse 16 Oct, 2022 @ 4:20pm 
That's why it's good to remember to share decent addons like this one with your friends
Cédric GÉRILLE [GiletJaune]  [author] 16 Oct, 2022 @ 3:35pm 
Yeah but there is also the keyword-based relevence that plays into that! It is so disappointing. I must have done something wrong.
Smith Furia 16 Oct, 2022 @ 12:36pm 
the steam workshop algorithm only gives attention to newer content, if your addon does not blow up in the first days it never will
Cédric GÉRILLE [GiletJaune]  [author] 16 Oct, 2022 @ 12:17pm 
I'm so sad that it's not easier to find. I don't know what to do to improve the way it shows up in search results. 😢
Smith Furia 16 Oct, 2022 @ 9:37am 
i was looking for a mod like this for more than a year, i finally found what i was looking for
Cédric GÉRILLE [GiletJaune]  [author] 16 Oct, 2022 @ 3:11am 
Hehe, you are welcome! 🇫🇷+🇮🇹=:extralife:
Dr. Freehouse 14 Oct, 2022 @ 7:48pm 
Thank you my french friend, you saved me many headaches! Love from Italy
Cédric GÉRILLE [GiletJaune]  [author] 8 Oct, 2022 @ 12:43pm 
Just start the test (no required arguments) and read the periodic output. The results the most near the top are the most laggy hooks. If there is a lag, make sure it happens, so you can see it on the output corresponding to the period of its occurrence.
If you specify a single argument "0", you stop the test.
Fruity 7 Oct, 2022 @ 4:13pm 
im kinda confused because idk how should i use it in gmod console
ADATS 8 Sep, 2022 @ 2:00am 
perfect:pcbs_gpu:
Cédric GÉRILLE [GiletJaune]  [author] 24 Aug, 2022 @ 11:37am 
Thank you guys so much for the appreciations!
Max 12 Aug, 2022 @ 4:46pm 
This is an amazing tool and should have 5 stars.

I run 600+ addons on a server with friends, so to easily find the culprits of the worse addons for performance makes everyone happy.

Good job man
inactive acc 9 Aug, 2022 @ 7:28pm 
This addon is amazing, I was having 15fps with lag spikes leading to less than 10 fps on a decent rig in most maps. I ran the commands to find the culprit (In this case it was an old SWEP more than seven years old), and after removing it and reloading the map my FPS easily shot up to 60+. Thank you so so much!!!
tourniquet taster 17 Jul, 2022 @ 6:54am 
Thanks!
Cédric GÉRILLE [GiletJaune]  [author] 17 Jul, 2022 @ 3:53am 
A frame lasts a given duration, for example 16.7 ms if you get 60 fps. It's basically the ratio of the hook duration (the sum of all the times it was called during a frame) over the frame duration. But if I remember correctly, I added some fancy calculation to compensate for whether a long time was spent during a single frame (noticeable lag), or if it is run like on every frame without spending a huge duration every time (overall slowdown), to give each case a meaningful impact score. And yeah, that explains why sometimes the impact is over 100% percent.
tourniquet taster 11 Jun, 2022 @ 7:24pm 
what does Impact mean? it's displayed as a precent for some reason.
Cédric GÉRILLE [GiletJaune]  [author] 23 May, 2022 @ 6:37pm 
Hehehe thank you for the detailed feedback, I appreciate it a lot!
Rōnin 31 Mar, 2022 @ 8:54pm 
I have to honestly thank you for this addon. For a while even with a solid computer build, I was only getting 15 fps on most maps. After using this I was able to delete COUNTLESS addons that were not only running excessively when not in use, or having memory leaks, but my game runs so much nicer now! I use it constantly to the point where I've optimized my game and can play at the 300 fps cap with ease. This tool is a godsend!