I need to get rid of the 'Resource time warning' message box

is there a (simple) way to oppress the mentioned-in-the-title “resource time warning” message? it starts going on my nerves ;]

ooh, pre-emptively answering: i’ve searched here, found some topics about it, but none had a definitive answer…

The simple way is to fix the resource that’s giving you the message.

1 Like

removing

private static int[,] squareMeter = new int[11000, 8000];

solves the issue. so no, its not about memory usage, since using 150 MB allocation did not cause this message. allocating 88 more MBytes from above, does. its weird.
using rather much memory does not effect its runtime behavior, the script is using ~1.5 ms on avergage, its not running a bubblesort on the entire array, hehe

i will try other ways like splitting 1 large resource, into smaller files, or maybe using bools instead ints…

That is very high.

really? i thought, its rather low, compared to f.ex the
-speedometer, which takes avg 0.25 ms, just for a display, and depends on the:
-fivem menu API, taking 0.17 ms with, and without a menu opened.

considering that there is no warning even if i let the CPUmsec raise up to 7.00 or above due to heavy calculations (causing lag), i wonder why there seems to be a limit on how much memory a script is allowed to allocate…

well, it seems its once more time to investigate.

/sherlock mode enabled…

Well, the highest resource of mine uses 0.28ms and thats vrp itself. 99% of all of my other resources are below 0.03ms.

As far as why you get a resource warning on how much memory is being used is because it’s using a lot of memory for a single resource, this could lead to texture loss and instability issues if not resolved.

I suggest using the Profiler tool to help troubleshoot the issue: