Separate resources into different folders or combine certain resources into the same folder?

Is there a server performance benefit to having more .lua files inside of a smaller amount of resource folders instead of separating each resource into its own resource folder or does that work just as efficiently?

So instead of having say 80+ different resources, would combining some of them into a single resource folder to have less (say 40 or 50) resource folders be better for the performance of a server? In particular I am trying to reduce the amount of time outs people are getting.

I hope that makes sense, if not please let me know and I will try to clarify.

Thanks!

It’s an interesting question and I would like to know too.

I think there’s no difference between 80 and 40 resources (if it’s only scripts). But I didn’t test to use like 1000 resources, it would be fun ^^.

The real question is about what’s fiveM do exactly when it starts a resource?

This is possible, Just add them all in a resource folder and add them in the __resource.lua

Define files in __resource.lua - that’s the key to your question.

__resource.lua

client_scripts {
"script1.lua",
"script2.lua",
"script3.lua",
"script4.lua",
"script5.lua",
}

server_scripts {
"script6.lua",
"script7.lua",
"script8.lua",
"script9.lua",
}

I understand that it is indeed possible, that was not my question.

My question was is there any performance benefit in doing so? Or would separating them into their own folders work just the same?

As far as i know there is barely any perfomance gain from it,if at all