V4RB/Vserver 241b1 Testing

Ruslan Zasukhin sunshine at public.kherson.ua
Mon Aug 7 19:30:19 CDT 2006


On 8/7/06 6:48 PM, "Russ Tyndall" <fitzbew at nc.rr.com> wrote:

>>> May I ask why?  For speed?  The former syntax works fine in my PEF builds.
>> 
>> Yes for speed.
>> 
>> Because you 3 times call the same function
>> 
>> You do this even in loop. So win will be even more
>> 
> 
> Ok..I think I am slowly understanding..
> 
> Would such a syntax be better for *all* field types, or only certain field
> types?  Wait...
> 
> The difference here must be that vCursor.Datefield().xxx incurs overhead
> *each* time it is called...for Year, Month, Day -- 3x the same overhead. You
> have said this, it is clear to me.
> 
> But vfield must call that overhead only once? And uses it for vCursor
> operations.
> 
> So...this advice is only good for DateField and DateTimeField fields?

No, this is for ALL fields!

    
    loop million times
    {
        tbl.Field( "aaaa" ).value = 5
    }

Above line in loop is in fact TWO function calls of plugin:

    
    loop million times
    {
        fld = tbl.Field( "aaaa" )
        fld.value = 5
    }

Now it is obvious that first line can be moved outside of loop

    fld = tbl.Field( "aaaa" )

    loop million times
    {
        fld.value = 5
    }

 
> And would this advice change if we are UPDATING field values or merely
> RETRIEVING field values?  I would guess both...

We talk here about ACCESS to field by name or by index.
What you are doing later with this field does not matter
 
> Probably most Valentina users already know this, they probably laugh at such
> questions.

Not a problem.

Russian verb:  "Repeating - is mother of learn"

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina-beta mailing list