Subject Re: Re[2]: [ib-support] FAST DATA PUMPING - BEST PRACTICE
Author Jerome Bouvattier
> >- Also be very careful when assigning source fields to destination params.
> >Avoid calls like FieldByName or ParamByName absolutely, or at least do your
> >mapping before the loop and use exlusively field and param *objects* in the
> >loop.

> What is the main reason for this. I do not think that using
> ParamByName would be slow. Is there anything else?

Look at the source code. ParamByName and FieldByName must iterate through the collection to find the matching object by *string comparison*. Multiple this process by the number of loops and the number of fields to pump and you end up with something by orders of magnitude slower than direct reference to objects.

--
Jerome


[Non-text portions of this message have been removed]