• What way would be more efficient?
    3 replies, posted
I really like to make my Addons as efficient as possible, performance wise (as much as possible with my knowledge of course XD) So, a addon i created uses alot of networking, and from what i know its possible to make the lua files in 2 ways: 1: One file in the client folder, and one file in the server folder, client file with the clientside networking, server file with the serverside networking. 2: one file in the lua/autorun folder, no subfolder for client or server. The file gets executed on server AND client. This file contains a if statement, if SERVER then --serverside network else --clientside network end And i just wondered what way would be more efficient? If even any difference..way 1 or 2?
You have to network either way. Option 2 doesnt execute on server and client because of the if statement.
Performance doesn't really play a factor in this case as they would be nearly equivalent, but the first way would be cleaner since your realm code is divided by file.
I know i have to network on either way? I never said it will work without networking that way.
Sorry, you need to Log In to post a reply to this thread.