Garry's Mod

Garry's Mod

Sandbox Crafting System
[Issue Report] Lag Issues on Client Side.
Hey! Small note that I picked up while using BadCoderz.

It seems as if SCS uses VGUI Material, specifically GM:PostDrawTranslucentRenderables, which is called after all translucent entities are drawn. This is better done by caching materials instead of rendering them live. You can see more information here on the FacePunch Wiki.[wiki.facepunch.com]

Hope this helps. I really like this addon, I don't want to remove it due to frame loss :)
< >
Showing 1-11 of 11 comments
w.black57  [developer] 18 Jul @ 4:29am 
I wish all bug reports are like these :happyfaye:, I'll look into it! Could you tell me when does the lag happen exactly?

Is it when there are so many materials that is 'consumed'?
Or as you craft more and more, it would start to lag?

Thank you!!
w.black57  [developer] 18 Jul @ 4:29am 
Also im curious whats BadCoderz :SurpriseElle: that sounds useful!
Last edited by w.black57; 18 Jul @ 4:30am
Arlo Ecloc 18 Jul @ 10:48pm 
Originally posted by w.black57:
I wish all bug reports are like these :happyfaye:, I'll look into it! Could you tell me when does the lag happen exactly?

Is it when there are so many materials that is 'consumed'?
Or as you craft more and more, it would start to lag?

Thank you!!

It seems to be constant even when the crafting system is not spawned. Even when not having the Crafty Table spawned in I'm seeing reports of the system being used. After removing the addon I seem to get like, 10-20 fps? It's hard to tell, I didn't do proper stress testing.

And I believe it's due to your holographic materials you are using in your hologram sign, but it could also be other materials in your addon!

I could do a proper test if you want me to in order to give a full report on this if you need.

Also BadCoderz[github.com] is a GitHub mod which uses a database of "bad code" to help find unoptimized code to fix, used as a debug tool. It'll tell how often your mod calls to the client and server, how many times it calls, and what libraries/hooks is being called! Very helpful to me as a modpack dev to find laggy mods and report found issues. Using "GM:PostDrawTranslucentRenderables" is often considered a common mistake for using materials.

Course I might be wrong ofc, and I'm glad to be so if I'm not correct in my report!
w.black57  [developer] 19 Jul @ 4:50pm 
Originally posted by Arlo Ecloc:
Originally posted by w.black57:
I wish all bug reports are like these :happyfaye:, I'll look into it! Could you tell me when does the lag happen exactly?

Is it when there are so many materials that is 'consumed'?
Or as you craft more and more, it would start to lag?

Thank you!!

It seems to be constant even when the crafting system is not spawned. Even when not having the Crafty Table spawned in I'm seeing reports of the system being used. After removing the addon I seem to get like, 10-20 fps? It's hard to tell, I didn't do proper stress testing.

And I believe it's due to your holographic materials you are using in your hologram sign, but it could also be other materials in your addon!

I could do a proper test if you want me to in order to give a full report on this if you need.

Also BadCoderz[github.com] is a GitHub mod which uses a database of "bad code" to help find unoptimized code to fix, used as a debug tool. It'll tell how often your mod calls to the client and server, how many times it calls, and what libraries/hooks is being called! Very helpful to me as a modpack dev to find laggy mods and report found issues. Using "GM:PostDrawTranslucentRenderables" is often considered a common mistake for using materials.

Course I might be wrong ofc, and I'm glad to be so if I'm not correct in my report!

I see, if I have the time Ill change the method of the hook call. Thank you!
Originally posted by w.black57:
Originally posted by Arlo Ecloc:

It seems to be constant even when the crafting system is not spawned. Even when not having the Crafty Table spawned in I'm seeing reports of the system being used. After removing the addon I seem to get like, 10-20 fps? It's hard to tell, I didn't do proper stress testing.

And I believe it's due to your holographic materials you are using in your hologram sign, but it could also be other materials in your addon!

I could do a proper test if you want me to in order to give a full report on this if you need.

Also BadCoderz[github.com] is a GitHub mod which uses a database of "bad code" to help find unoptimized code to fix, used as a debug tool. It'll tell how often your mod calls to the client and server, how many times it calls, and what libraries/hooks is being called! Very helpful to me as a modpack dev to find laggy mods and report found issues. Using "GM:PostDrawTranslucentRenderables" is often considered a common mistake for using materials.

Course I might be wrong ofc, and I'm glad to be so if I'm not correct in my report!

I see, if I have the time Ill change the method of the hook call. Thank you!

You're welcome!! Good luck, hope you can get it figured out, excited to use the addon again!!
w.black57  [developer] 22 Jul @ 2:37am 
Originally posted by Arlo Ecloc:
Originally posted by w.black57:

I see, if I have the time Ill change the method of the hook call. Thank you!

You're welcome!! Good luck, hope you can get it figured out, excited to use the addon again!!

Hi @Arlo Ecloc

Thanks for your patience! I managed to change the code to remove the hook when the beam's aren't active. Should remove some unnecessary hooks while nothing is happening. Also I didnt notice a duplicate client lua file that was uploaded, could be a culprit also haha. Tell me if there is a difference :happyfaye:
Originally posted by w.black57:
Originally posted by Arlo Ecloc:

You're welcome!! Good luck, hope you can get it figured out, excited to use the addon again!!

Hi @Arlo Ecloc

Thanks for your patience! I managed to change the code to remove the hook when the beam's aren't active. Should remove some unnecessary hooks while nothing is happening. Also I didnt notice a duplicate client lua file that was uploaded, could be a culprit also haha. Tell me if there is a difference :happyfaye:

Nice! I'll check it out the next time I'm in-game and get back to ya. Good finds. :)
I get a Error whenever I craft something. It's related to something being translucent. (Also i'm using a custom preset.)

[Sandbox Crafting System] lua/autorun/wecraft_cl.lua:349: attempt to index field 'PostDrawTranslucentRenderables' (a nil value)
1. EnsureZapHook - lua/autorun/wecraft_cl.lua:349
2. func - lua/autorun/wecraft_cl.lua:394
3. unknown - lua/includes/extensions/net.lua:34
Last edited by MosinNagant; 7 Aug @ 10:56pm
I also tried making a recipe for the combine turret, but when it spawned in it got damaged landing on the crafty table. I tried throwing it against the ground and it didn't get damaged once.
Originally posted by MosinNagant:
I get a Error whenever I craft something. It's related to something being translucent. (Also i'm using a custom preset.)

[Sandbox Crafting System] lua/autorun/wecraft_cl.lua:349: attempt to index field 'PostDrawTranslucentRenderables' (a nil value)
1. EnsureZapHook - lua/autorun/wecraft_cl.lua:349
2. func - lua/autorun/wecraft_cl.lua:394
3. unknown - lua/includes/extensions/net.lua:34

This is a seperate bug report for lag issues, not a general error post.
Oh, i misread it as the discussion for all issues
< >
Showing 1-11 of 11 comments
Per page: 1530 50