[OpenSIPS-Users] dp_translate performance

Bogdan-Andrei Iancu bogdan at opensips.org
Mon May 5 13:04:20 UTC 2025


Hi,

It depends on what you are trying to do. IF you just want to do a 
DID/number matching (prefix or full len), better use the drouting module 
or, new in 3.6, the trie module. They are using search trees and the 
search speed does not depend on the overall number you have stored, but 
on the number len only.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 03.05.2025 12:27, M S wrote:
> Hi guys,
> Has anybody done any performance metrics for dp_translate? For 
> example, to check 1,000,000 numbers with dp_translate, how much delay 
> is added?
> How better is it to use a
> for(i=0 to 1000000) {
> if($sql_cached_value(c_features:disabled:$fU)<>NULL 
> || $sql_cached_value(c_features:disabled:$rU)) {
>       send_reply(503);
>   }
> }
>
> instead of just a:
>
> if(dp_translate($fU) || dp_translate($rU)) {
>   send_reply(503);
> }
>
> Thanks!
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list