You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: web/src/pages/reference/Element_data.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,8 @@ By default, every element data is synchronized between the client and the server
22
22
However, with a big number of elements and a big amount of element data, the load on the server and the network increases - therefore, if you don't need synchronization, you can disable it or limit it to specific players for whom it should be synchronized.
23
23
Synchronizing element data when it's not needed wastes bandwidth and unnecessarily burdens the server.
24
24
25
+
Never use [setElementData](/reference/setElementData) (with sync = true) in events that fire often (like [onClientRender](/reference/onClientRender)) without further optimization or conditions.
26
+
25
27
#### How to disable or limit synchronization?
26
28
You can completely disable synchronization by setting the 4-th argument of the [setElementData](/reference/setElementData) function to **false**.
27
29
In that case, the element data will exist only on the side where it was set.
0 commit comments