[OpenSER-Users] About efficiency in conditionals

Iñaki Baz Castillo ibc at in.ilimit.es
Tue Oct 16 15:33:29 CEST 2007


El Tuesday 16 October 2007 15:18:58 Klaus Darilion escribió:
> Iñaki Baz Castillo wrote:
> > Hi, I'm wondering which solution (A or B) is more efficient in case
> > method is NOT an INVITE:
> >
> >
> > A)  if ( (method=="INVITE") && (isflagset(5) || isbflagset(6)) )
> >
> > B)  if ( mehtod=="INVITE" )
>
> AFAIK the conditions are checked in the order they appear and stop as
> soon as possible. In your case in != INVITE it should be the same.

Nice to know it.


> Further, if you use is_method("INVITE") it is even faster.

Ops, I didn't know that. Ok, I'll change all my script :)


Thanks again.


-- 
Iñaki Baz Castillo
ibc at in.ilimit.es




More information about the sr-users mailing list