NUI lagging for players when 100+ players

,

Hello, my UI when the server is over 100+ players, even with 0.94 total resmon. Im using onesync infinity, does anyone know what can be done about it?

Hello Wave_Studios,

use the profiler (Using the profiler - Cfx.re Docs) to identify the resource. Please note that the resmon only measures the lua performance, not the NUI page. If your UI is lagging then most likely a resource of yours (or even the resource in which the ui is) in the JavaScript file has too high a load, for example due to loops that are unnecessarily executed every tick. This can be easily identified using a profiler.

Another option would be to activate the Setting: NUI in-process GPU if the problem only occurs for you, for example.
Here is a tutorial on how to do this (not in my language but the video shows everything):

Regards :ok_hand:t2:

Hello! Thank you for your help and time, so basically server-side can lag the player’s UI? Back in a days when the server was growing I used profiler to optimize server-side because the server used to crash when had many players but there are still some scripts that can do some 500ms warning to the server console, do you think that could be the cause?

Hello Wave_Studios,

The server side has nothing to do with the client and also not with the nui. use the profiler on clientside to analyze it. Also the interaction of server and clientside (LUA) will not be the cause of your problem. The 500ms warning indicates a different problem that you may need to deal with. The error is on the NUI side on the client, so you can well limit it to a .js file. The error is on the NUI side on the client, so you can well limit it to a .js file. However, the profiler may not find anything either, in which case the only thing that will help you is the “old way”. Test each script yourself

Regards :ok_hand:t2:

1 Like

How would I detect the script ,could you give a code example, that is giving lag to the others, or it only gives the lag for himself?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.