[Moved this thread to the bugs section]
There seem to be performance problems with (some?) auto-assign equations.
Here's a function I'll use in my example:
Function CheckYNField (StringVar,field)
if instr(field,StringVar)>0 then
CheckYNField = -1
else
CheckYNField = 0
end if
End Function
(What it does is basically giving back a -1 value if a certain string is found in a field -- this value can be used to check/uncheck Boolean Y/N fields.)
I've been using this equation in at least 2 different ways to obtain the same results... but with big performance differences !
1- In the first way, I've used the function in the row equation section of a field (field management dialog).
E.g. : In the
Contact
field I have put in the row equation section : CheckYNField ("xCON-",TypeDocBib)
So that when I write "xCON-" in the
TypeDocBib
field, the contact field is instantly checked.2- to achieve the same thing, I could also have a similar equation in the auto-assign section of the TypeDocBib field.
E.g. : In the
TypeDocBib
field I have, in the auto-assign section : AME:Contact=
CheckYNField("xCON-",TypeDocBib)
So that -- exactly like #1 -- when I write "xCON-" in the
TypeDocBib
field, the contact field is instantly checked.Now... I tried putting several auto-assigns rules using the
CheckYNField()
function in the TypeDocBib
TypeDocBib
fielde.g. :
AME:Contact=
CheckYNField("xCON-",TypeDocBib)
AME:Task=
CheckYNField("xTAE-",TypeDocBib)
AME:Projet=
CheckYNField("xPJ-",TypeDocBib)
etc.
but then, everytime I write something in the
TypeDocBib
field it takes a looonnnnggg time for IQ to process the info in the TypeDocBib
field and check the appropriate Boolean fields.So... I reverted to the first solution (#1).
With solution #1, when I write something in the
TypeDocBib
field, the computing is almost instantaneous, even if there are several fields in which the CheckYNField("SpecialString",TypeDocBib) is involved.
Questions :
1- Why is there such a performance difference ?
2- Is it normal (or could it be optimized) ?
3- Does that mean that Row equations should be favoured ? (Yes, some things might be a bit harder to achieve with Row equations, but if the performance is that much better, it's probably worth it...)
Comments
CheckYNField ("xTAE-",typeDocbib)
CheckYNField ("xOBJ-",typeDocbib)
CheckYNField ("xDF-",typeDocbib)
CheckYNField ("xCON-",typeDocbib)
CheckYNField ("xJO-",typeDocbib)
CheckYNField ("xRL-",typeDocbib)
CheckYNField ("xCO-",typeDocbib)
A:WIKITag=AddKeyword(WIKITag, "tgsPScHu") |
A:WIKITag=AddKeyword(WIKITag, "tgsPPsTh") |
A:WIKITag=AddKeyword(WIKITag, "tgsPpsye")