Hello, it is important to understand that objects and collections are references, and "bridge" commands such as OB GET ARRAY and OB SET ARRAY create deep copies of the entity that is referenced.
if, for example, you were to append an item to an object array that belongs to an object, OB GET ARRAY, APPEND TO (object) ARRAY, OB SET ARRAY would be extremely inefficient. you must use object notation and collection methods for such operation. in fact, you should use object notation just once, to get a handle on the property which is a collection of objects, and work with that reference directly rather than dotting your way through to the property each time. --- recently I have worked on a project with an object with thousands of properties and tens of thousands of array elements, but I had none of the performance issue you describe, because I always use object notation and collection methods. we still need to convert typed collections to native arrays from time to time, because popup menus or tab controls don't support collections. but in the UI the number of elements are naturally limited. http://doc.4d.com/4Dv17/4D/17/COLLECTION-TO-ARRAY.301-3730912.en.html http://doc.4d.com/4Dv17/4D/17/ARRAY-TO-COLLECTION.301-3730916.en.html http://doc.4d.com/4Dv17/4D/17/Type-conversions-between-collections-and-4D-arrays.300-3730918.en.html now that we have C_COLLECTION and object notation, I honestly think ARRAY OBJECT is totally wasted. 2018/10/01 9:46、Jim Crate via 4D_Tech <[email protected]<mailto:[email protected]>>のメール: TL;DR: don’t put object arrays of more than a couple hundred elements into an object if you don’t like looking at the spinning wheel of death. And definitely don’t expand an object property in the debugger that has an object array of 800+ elements unless it’s time to break for multiple drinks. ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

