Skip to content

Commit 7e9149e

Browse files
committed
Update element data performance section
1 parent 5db442f commit 7e9149e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

web/src/pages/reference/Element_data.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ By default, every element data is synchronized between the client and the server
2222
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.
2323
Synchronizing element data when it's not needed wastes bandwidth and unnecessarily burdens the server.
2424

25+
Never use [setElementData](/reference/setElementData) (with sync = true) in events that fire often (like [onClientRender](/reference/onClientRender)) without further optimization or conditions.
26+
2527
#### How to disable or limit synchronization?
2628
You can completely disable synchronization by setting the 4-th argument of the [setElementData](/reference/setElementData) function to **false**.
2729
In that case, the element data will exist only on the side where it was set.

0 commit comments

Comments
 (0)