Jump to content

[QUESTION] setElementData and triggerEvents


Bilal135

Recommended Posts

Posted

My question is that does setElementData and triggering events server side and client side frequently cause lags? or if we use setElementData frequently, will it cause some bugs or not work properly?

Thanks in advance.

Posted

setElementData shouldn't do any lag, unless you really use it well i don't know onClientRender or something?

triggering events can cause lags when used too much times at same time (but it really depends on how big the data is that event is sending)

  • Moderators
Posted

You can circa see how many they use when you type: /shownetstat

When I compared those two I got this result.

Which one uses more bandwidth:

Triggering uses much more bandwidth than elementdata when it is just you and the server.

But when there are more players in the server, you have to multiply the elementdata with the amount of players.

So for example (the elementdata will be set serverside): elementdata uses 1 kb, 1 kb X 8 players = using 8 kb total.

If you have a server with 1000 players in it(like sometimes CIT), you will be using 1000kb.

Which one is faster?

Triggering is much faster than using elementdata, you can probably compare the speed of elementdata with triggerLatentClientEvent, but I do not know the exact speed of both.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...