• NetworkVar performance
    4 replies, posted
Are NetworkVar's cached or is calling GetBlahBlah() for drawing text and stuff bad? To give some context I'm just writing a simple dumpster addon which has 3D2D text displaying the next time you can search it. I do know you could use the Net library but I'm trying to explore other options.
You should use NetworkVars for networked data that can change over time - if it is a one time network/update, then I would recommend using the net library. Calling Get*() just accesses a table of net data and thus has negligible impact; the actual networking load happens asynchronously.
Thanks, but is there any way I would have found this out otherwise without asking somebody?
The wiki doesn't document internal behaviour, so googling other Facepunch threads would be the best source.
The wiki indicates that DataTables use the engine's networked variables system. Networking Entities The network vars are only transmitted under specific conditions unless stated otherwise, and they are transmitted on every update if they changed.
Sorry, you need to Log In to post a reply to this thread.