On Aug 21, 12:40 pm, beadrsh <[EMAIL PROTECTED]> wrote:
> On Aug 21, 3:31 am, Norris Boyd <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Aug 18, 8:22 am, beadrsh <[EMAIL PROTECTED]> wrote:
>
> > > Hi all,
>
> > > I loop through all the rows in a table and for each row i retrieve the
> > > column values and set it to the scope of the script for ex: the table
> > > has a column "Name" and for each row i set the variable name as Name
> > > and the value for it in the scope of the script and execute the
> > > script.I reuse the same scope for all the rows in the table.My
> > > question is do the variable Name get re-declared for each tuple or
> > > just a new value assigned to the already existing variable in the
> > > scope when i try to reassign the variable "Name" value.
>
> > > thanks in advance
>
> > Not sure exactly what you're asking as far as the difference between
> > the variable being redeclared or reassigned to the existing variable.
> > It's the latter, but I'm not sure that a script can tell the
> > difference.
>
> > --Norris
>
> Hi,
> Many thanks for the reply.My main concern would be the memory
> utilisation.As there chances that
> there could be thousand of rows(but same column name variable for each
> row)in the table, i wanted to make shoor that reusing the same scope
> for all the rows would not be a performance hit.

Ah, I understand. Performing a Scriptable.put on the column name will
replace the reference from the previous Scriptable.put, and will be no
references from the object to the previous object.

--N
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to