<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>well, it is not easy to predict, because it is a matter of
      density (or overlapping characters).<br>
    </p>
    <p>Anyhow, it also depends on the module parameter char_list -- if
      you want any character from alphabet there is going to use lot of
      memory.</p>
    <p>For first value added in the tree, it creates 'sizeof(value) *
      sizeof(char_list)' internal structures.</p>
    <p>But then, if the next value added shares a prefix with the
      previous values, then it reuses from the previous internal
      structures.</p>
    <p>The best to see how it goes is to put the data in database table
      and load them, then check the use of shared memory.<br>
    </p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 01/07/16 13:43, José Seabra wrote:<br>
    </div>
    <blockquote
cite="mid:CAEVZRWtJNsD1nwMrw3w826TQopCdB_rhRPbtL+1CVheC2AAruA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>Can you tell me what is the memory usage in mtree for each
          non-numeric record with ~ 10 characters?</div>
        <div><br>
        </div>
        <div>Mtree using more memory can decrease its own performance?</div>
        <div><br>
        </div>
        <div>Thank you</div>
        <div>BR</div>
        <div>José</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2016-07-01 12:34 GMT+01:00
          Daniel-Constantin Mierla <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:miconda@gmail.com"
              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>Hello,</p>
              <p>the matching rules are stored pre-compiled in memory,
                not being parsed every time, unless you have rules with
                variables.</p>
              <p>Combining mtree with dialplan can increase
                performances, just be aware that if you have non-numeric
                values stored in 'tprefix' column, it is going to use a
                lot of memory for lot of records.</p>
              <p>Cheers,<br>
                Daniel<br>
              </p>
              <div>
                <div class="h5"> <br>
                  <div>On 01/07/16 10:20, José Seabra wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>Hello Daniel,<br>
                              </div>
                              Thank you for your reply,<br>
                            </div>
                            What are optimizations to increase the speed
                            of processing?<br>
                            <br>
                          </div>
                          I have <span lang="en"><span>thought</span></span>
                          in another solution that is use diaplan module
                          only for apply manipulations and use mtree to
                          match prefixes after apply manipulations.<br>
                          <br>
                        </div>
                        <div>What is your opinion on this?<br>
                          <br>
                        </div>
                        <div>Thank you again for your great support.<br>
                          <br>
                        </div>
                        Regards<br>
                      </div>
                      José Seabra<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">2016-07-01 8:58 GMT+01:00
                        Daniel-Constantin Mierla <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:miconda@gmail.com"
                            target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>></span>:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000">
                            <p>Hello,<br>
                            </p>
                            the transalation records are cached by
                            kamailio and precompiled, so there are
                            optimizations to increase the speed of
                            processing. But have in mind that the rules
                            are matched one by one from the same dpid,
                            in the order of priority.<br>
                            <br>
                            For the records where you don't have
                            substitutions/replacement, you can set empty
                            string -- it should work.<br>
                            <br>
                            Cheers,<br>
                            Daniel
                            <div>
                              <div><br>
                                <br>
                                <div>On 29/06/16 13:30, José Seabra
                                  wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">
                                    <div>
                                      <div>
                                        <div>
                                          <div>Hello there,<br>
                                          </div>
                                          I'm evaluating if I can use
                                          dial-plan and dispatcher
                                          module to build a kamailio
                                          routing server to route calls
                                          based on number
                                          dialed(sometimes the number
                                          dialed can be Alphanumeric).<br>
                                        </div>
                                        I'm expecting have lot of
                                        dial-plan entries, some of them
                                        with manipulations, others
                                        without.<br>
                                        <br>
                                        Anyone can see here any
                                        limitation on this
                                        implementation?<br>
                                      </div>
                                      <div><br>
                                        One thing that I have noticed is
                                        that dial-plan module enforces
                                        me to fill the fields substr_exp
                                        and repl_exp even if i don't
                                        have any manipulations to apply.<br>
                                        <br>
                                        I'm also concerning  about
                                        performance issues with lot of
                                        dialplan entries.<br>
                                      </div>
                                      <br>
                                      What are your thoughts about this
                                      solution?<br>
                                    </div>
                                    <div><br>
                                    </div>
                                    Thank you<br>
                                    <div>
                                      <div>
                                        <div>
                                          <div>
                                            <div>-- <br>
                                              <div
                                                data-smartmail="gmail_signature">
                                                <div>José Seabra</div>
                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span><font color="#888888">
</font></span></pre>
                              <span><font color="#888888"> </font></span></blockquote>
                            <span><font color="#888888"> <br>
                                <pre cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> - <a moz-do-not-send="true" href="http://www.kamailio.org" target="_blank">http://www.kamailio.org</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
                              </font></span></div>
                          <br>
_______________________________________________<br>
                          SIP Express Router (SER) and Kamailio
                          (OpenSER) - sr-users mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:sr-users@lists.sip-router.org"
                            target="_blank">sr-users@lists.sip-router.org</a><br>
                          <a moz-do-not-send="true"
                            href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
                            rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <br>
                      -- <br>
                      <div data-smartmail="gmail_signature">Cumprimentos
                        <div>José Seabra</div>
                      </div>
                    </div>
                  </blockquote>
                  <br>
                  <pre cols="72">-- 
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a> - <a moz-do-not-send="true" href="http://www.kamailio.org" target="_blank">http://www.kamailio.org</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature" data-smartmail="gmail_signature">Cumprimentos
          <div>José Seabra</div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> - <a class="moz-txt-link-freetext" href="http://www.kamailio.org">http://www.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>