Skip to content

Commit f5ded29

Browse files
authored
Improve language around millions of Entities (#1928)
1 parent c179fb5 commit f5ded29

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

Diff for: docs/entities-intro.rst

+5-12
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,16 @@ For now, you can limit the Entities that are available from a :ref:`select_one_f
122122
Can I have millions of Entities?
123123
--------------------------------
124124

125-
There are two current limitations that make millions of Entities impractical: data transfer and form performance.
125+
Yes, but there are two limitations that may make millions of Entities impractical: data transfer and form performance.
126126

127-
Currently, all Entities that have not been deleted are sent to every device on every update. Depending on your data connection, this may be a limiting factor for your project. To address this, we will eventually add functionality such as archiving Entities, synchronizing only updated Entities, or assigning a subset of Entities to a user.
127+
Currently, all Entities are sent to every device on every update. Depending on how much data is stored in your Entities and your team's network connection, using millions of Entities may not be practical. To address this limitation, we plan on adding support for archiving Entities, synchronizing only updated Entities, or assigning a subset of Entities to a user.
128128

129-
Starting in Collect v2024.3 and Central v2024.3, Entities are optimized so that larger numbers can be used in forms. If your choice filters and :ref:`lookup expressions <referencing-values-in-datasets>` use simple expressions with ``=``, ``and`` and ``or``, they will be performed quickly. We verify that a form with 100,000 Entities with 6 properties that are each 36 random characters long is usable on a device from 2021 with 3 GB of RAM.
129+
Choice filters and :ref:`lookup expressions <referencing-values-in-datasets>` are the other limiting factor. Starting in Collect v2024.3 and Central v2024.3, simple and common expressions with ``=``, ``and`` and ``or`` are very fast. Complex expressions in lookups or choice filters (e.g., :doc:`functions <form-operators-functions>` like :func:`substr`) may slow your form if you have more than 50,000 Entities on devices with low amounts of RAM. We regularly review our analytics to look for opportunities for performance improvements.
130130

131-
If you use function calls in choice filters or lookup expressions, the entire Entity List may need to be stored in memory. Modern devices can easily process multiple tens of thousands of entities in this way, but your form may become slow or crash if you have more than 50,000 Entities.
132-
133-
The number of properties that each Entity has and the size and uniqueness of values saved will also affect both data transfer and form performance.
134-
135-
.. seealso::
136-
:ref:`What form fields should I save to my Entities as properties? <entities-intro-form-fields>`
137-
138-
If you have a form with may Entities that feels slow, we encourage you to post about it on `the forum <https://forum.getodk.org/c/support/6>`_ so that we can recommend approaches that will make it work faster or design improvements to the system.
131+
The number of properties that each Entity has, the size and uniqueness of values saved, and the devices used all affect data transfer and form performance. If you have a form with many Entities that feels slow, we encourage you to post about it on `the forum <https://forum.getodk.org/c/support/6>`_ so that we can recommend approaches that will make it work faster or design improvements to the system.
139132

140133
.. note::
141-
We generally do not recommend using `search() <https://xlsform.org/en/#dynamic-selects-from-pre-loaded-data>`_ instead of ``select_one_from_file`` because it does not work with offline Entities and is less flexible. Starting in Collect v2024.3 and Central v2024.3, there is limited performance benefit to ``search()``.
134+
We do not recommend using `search() <https://xlsform.org/en/#dynamic-selects-from-pre-loaded-data>`_ instead of ``select_one_from_file`` because it does not work with offline Entities and is less flexible. Starting in Collect v2024.3 and Central v2024.3, there is limited performance benefit to ``search()``.
142135

143136
My form captures data on multiple different things, can I create multiple Entities with a single submission?
144137
------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)