Ok good to know, "cache the set from the DG " Yeah thats what I thought as well...
Performance hit maybe not be bad by itself but I did see some code that looped the over the columns array: for(.. columns.length ...)columns[i] So on every loop you duplicate the array once for the length check and once again for the access and on a 20+column array that starts to add up... tks --- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Yeah, you're making a copy every time. Shouldn't be a major performance > hit as it doesn't clone the column objects, it just makes a new array of > references to them. > > > > If you have to get at them often, you might want to keep a reference to > the set you passed in, or cache the set from the DG unless you think it > is going to change often. > > > > ________________________________ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of reflexactions > Sent: Friday, October 19, 2007 11:10 PM > To: [email protected] > Subject: [flexcomponents] DataGrid column access > > > > I am working on a DataGrid subcomponent and have been accessing the > columns array frequently, thinking nothing of it I just do something > like: > > ... columns[i] ... > > but then I saw that the columns getter function does a _columns.slice > (0). > > Is the compiler smart enough to figure out i dont really want to clone > the columns array every time I access it or am I really forcing it to > copy the array? > > tks >
