Transferring massive tables with net library

I am working on a whitelist system which stores data as .txt on the server. When a user types the menu command, server reads all the files in data and creates a massive table which includes every userdata like;


{
	"whitelisted": 
	[
		"Acemi Asker"
	],
	"name": "Hewal Armagedon",
	"steamid": "STEAM_0:1:EXAMPLE"
}

Then transfers it using net.WriteTable() to the client. And a derma is being created in the clientside with this data.

http://puu.sh/tZtRf/56d2ac5b5f.png

I think that’s why my server is laggy. I don’t want to store this data in shared because I don’t want to let players acces this data with simple lua codes. Are there any efficient way to do this?

Just network it once initially, or when the user originally opens the menu. Only network necessary data, and possibly use a stringtable to only have to network ints.

But what if someone adds a job whitelist to a player? I mean the data should be updated after editing it. So every time someone edits something, then the massive transferring should start again to update it on every admin. Isn’t it hard for the server?

Don’t use net.WriteTable for something like this. There’s a lot of overhead. Set it up so that the client only receives a portion of the data by using “page numbers”. For example, if the client requests page 1, give them the first X data. If they request page 2, give them the data after that.

Only transfer the changes

Thanks to both of you, it helped me a lot.