Issue with c#in resource monitor

Hi guys,

I just started typing scripts in c# when i found out that a blank script is consuming around 0.20 ms while a full lua script is using maybe only 0.03. Does anyone know why it does this ?

First ever time I have used the resmon, but on top of the CPU time I have also noticed all scripts are constantly increasing in memory too, a blank script gained 50kb after 5mins of me watching it.

1 Like

There have been discussions about this before. It’s indeed true that an empty C# resource runs at 0.30ms.

Why does it do this? Nobody knows exactly but it might have to do with AppDomain remoting.

Either way, it’s a known issue and it’s being looked in to.

I’m running a server with >30 C# resources, there is always one resource that uses 0.3msec of CPU time, the rest of the remaining resources just run at ~0.02ms-ish. I’d suspect that the first resource sets some stuff up related to (probably) AppDomain remoting (what ever that might be).

Should be normal, at some point the memory should get garbage collected, could be of hindrance when you run many (100+) C# resources. Lua should not be an issue due to lazy loading of natives.

1 Like

image

It doesn’t work the same way on mine tho xD

What script is the Resource Monitor?

It’s not a script. It’s built-in to FiveM. Open the console (F8) and type resmon 1. There’s more monitors too, like netgraph 1

Thank you! As always u the beat :kissing_heart: