You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lua/badcoderz/sh_data.lua
+30-2Lines changed: 30 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,24 +15,52 @@ BadCoderz.heavy_funcs = {
15
15
[file.Size] ="file.Size",
16
16
[file.Time] ="file.Time",
17
17
[file.Write] ="file.Write",
18
-
[Color] ="Color"
18
+
[Color] ="Color",
19
+
[Vector] ="Vector",
20
+
[Angle] ="Angle",
19
21
--[[
20
22
candidates for "dumb fuckers" update :
21
23
CompileString
22
24
RunString
23
25
RunStringEx
24
26
ents.Create
25
27
surface.CreateFont
28
+
table.HasValue
26
29
]]
27
30
}
28
31
32
+
-- bool is represending a required(true) knum/kshort or an optional one (false), it's used when inspecting the bytecode
33
+
BadCoderz.heavy_funcs_objects= {
34
+
[Color] = {
35
+
{
36
+
["Color"] =true,
37
+
["SetDrawColor"] =true
38
+
},
39
+
{true, true, true, false}
40
+
},
41
+
[Vector] = {
42
+
{
43
+
["Vector"] =true
44
+
},
45
+
{true, true, true}
46
+
},
47
+
[Angle] = {
48
+
{
49
+
["Angle"] =true
50
+
},
51
+
{true, true, true}
52
+
}
53
+
}
29
54
30
55
31
56
BadCoderz.toolTips= {
32
57
["player.GetAll"] ="This function is used to find all players, it depends of the implementation and what the dev is doing with it but there is good chances he's doing CPU Intensive things in this loop",
33
58
["ents.GetAll"] ="This function is used to find all entities (A LOT), it depends of the implementation and what the dev is doing with it but there is good chances he's doing CPU Intensive things in this loop",
34
59
["file.Append"] ="Working with files is always slow, doing it a lot is a TERRIBLE IDEA",
35
-
["Color"] ="This functions creates a new Color object on each call, it takes ram, cpu time to be allocated in the memory and cpu time by the garbage collector, so the dev is supposed to cache it. Only the Color() calls with static values (not vars) are detected."
60
+
["Color"] ="You NEVER need to create a color on each frame with static arguments, cache it out of your rendering context.",
61
+
["Vector"] ="You NEVER need to create a vector with static arguments on each tick, cache it outside of the hook and if you need to, use the Vectors metamethods.\nEx :\n\tpos:Add(posOffset)\ninstead of :\n\tpos1+Vector(4,0,9)\n",
62
+
["Angle"] ="You NEVER need to create an angle with static arguments on each tick, cache it outside of the hook and if you need to, use the Angles metamethods.\nEx :\n\tang1:Add(ang2)\ninstead of :\n\tang1+Vector(4,0,9)\n"
0 commit comments