[Serusers] ser.cfg tuning question

Bogdan-Andrei IANCU iancu at fokus.fraunhofer.de
Thu Sep 30 18:54:17 UTC 2004


from performance point of view, is better to use a flag instead of 
calling several time is_user_in - which is slow because of db 
interaction (even if there is some caching, you still go through the db 
engine - mysql library).
the flag operations are very simple and fast implemented.

bogdan


Java Rockx wrote:
> Hello.
> 
> I'm using MySQL with ser. I need to check the ACL several places in my ser.cfg
> script. Is there any difference in calling is_user_in() multiple times versus
> calling it once and setting a flag. Then referencing the flag elsewhere rather
> than calling is_user_in() again? I guess I just don't know if calling
> is_user_in() hits the database every time or if it caches results.
> 
> Example:
> 
>     if (is_user_in("Request-URI", "voicemail")) {
>                                                                                
>                                                                                
>      setflag(31); 
>     };
> 
> some where else in ser.cfg:
> 
>     if (isflagset(31) {
>       do something
>     };
> 
> Regards,
> Paul
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the Serusers mailing list