Re: C_OBJECT Performance problem with arrays

2018-10-01 Thread Kirk Brooks via 4D_Tech
Miyako, On Mon, Oct 1, 2018 at 1:29 PM Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > > This makes it easy to, say, iterate through each element. Beyond > > convenience are you saying this is more efficient than using the full dot > > notation? > > it depends on how frequently you

Re: C_OBJECT Performance problem with arrays

2018-10-01 Thread Keisuke Miyako via 4D_Tech
> 2018/10/02 4:48、Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>のメール: > > Just to be clear about what you're saying here - let's say I populate a > large object, $bigObj, with some complex data. I might create a handle to a > collection within it as you describe: > >

Re: C_OBJECT Performance problem with arrays

2018-10-01 Thread Kirk Brooks via 4D_Tech
Miyako, On Sun, Sep 30, 2018 at 8:24 PM Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > 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

Re: C_OBJECT Performance problem with arrays

2018-09-30 Thread Jim Crate via 4D_Tech
It’s good to know that there are ways to work around this in v17. I forgot to mention that I’m working in v16 where we don’t have collections or dot notation yet. Jim > On Sep 30, 2018, at 8:22 PM, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > Hello, > > it is important to

Re: C_OBJECT Performance problem with arrays

2018-09-30 Thread Keisuke Miyako via 4D_Tech
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

C_OBJECT Performance problem with arrays

2018-09-30 Thread Jim Crate via 4D_Tech
I ran into a serious performance problem with 4D Objects and figured I’d mention it so others may be able to avoid the scenario. I am consuming an API returning JSON. Some endpoints return an object with properties, and some return an array of objects. To present a consistent interface in the