[Users] Faster to do avp_printf();avp_check OR search()?
Kanakatti Mahesh Subramanya
mahesh at aptela.com
Thu Aug 25 16:44:10 CEST 2005
True. and agreed.
I was actually trying to be more general, i.e., if I wanted to do some
processing on the contents of a specific header, would it be more
efficient to extract that header using avp_printf(), and then search
within it, as compared to just searching on the whole message
The answer, as it turns out, is that yes it is probably faster (limited
to walking through and extracting just the header), and safer (less
chance of matching against something else altogether)
Daniel-Constantin Mierla wrote:
> If you want just to check if there is a Refer-To header, you can use
> the function is_present_hf() from textops module. This is the fastest
> way to check if a header exists.
> On 08/24/05 16:12, Kanakatti M. Subramanya wrote:
>> e.g., if I want to do something if there is a Refer-To header in the
>> am I better off doing
>> avp_printf("$someAvp", "$rt");
>> avp_check("$rt", "re/.../i");
>> Just want ot know whether to get started rewriting all the "search()"
>> strings i have in my ser.cfg....
>> Users mailing list
>> Users at openser.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 332 bytes
Desc: not available
More information about the sr-users