performance: tcl proc vs xlt+variant

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf performance: tcl proc vs xlt+variant

  • Creator
    Topic
  • #51439
    Yves Guerin
    Participant

      Hello,

      I am wondering which solution is the best regarding the performance (cpu friendly)

      Task to do: delete the DG1 segment in A01,A08,A011 but I got the A03 too (who do not contain the DG1 segment)

      Solution-1: tcl proc in the inbound thread

         – pros:

              — the tcl interpet will compile the tcl proc so I will gain time

         – cons:

             — parse the message, remove the DG1 segment and rebuild the new message

             — waste time on the A03

      Solution-2: create a variant and remove the DG1 segment, I do a bulkcopy on top on my xlate

         – pros:

             — do not manage the trouble to remove the segment, the variant will do it for me

             — no waste of time for the A03

         – cons:

             — ?

      thank you in advance your help

      Yves

    Viewing 4 reply threads
    • Author
      Replies
      • #70287
        Tom Rioux
        Participant

          It is my understanding that the Xlates run tcl in the background to perform their functions.  If this is the case, I really see no difference one way or another.

          My preference would be to do this in an xlate.  It is much simpler.   All you need to do is have an IF statement.   If the message is an A01, A08, or A11, simply do a Pathcopy of @null to the DG1 segment.

          Hope this helps…

          Tom Rioux

        • #70288
          Yves Guerin
          Participant

            Hello,

            Thank you for your answer. I use the bulkcopy, like this, I do not have to care about the segments.  I did a xlate for each message anyway (I have to: from 2.3 to 2.2) so I let the xlate thread to handle this kind of problem, and I think (I do not know what happen behind the scene) it is more efficient than the inbound proc.  May be I am wrong ?!

          • #70289
            Jim Kosloskey
            Participant

              I too use the Xlate.

              Slight difference – I do not use BULKCOPY – so all I need to do if the receiving system indicates they do not support certain segments is I simply don’t COPY or PATHCOPY that segment.

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #70290
              Yves Guerin
              Participant

                Hello,

                💡 Great idea to put on the hl7 message, the information about the delete operation to perform.

                I use this kind of manipulation to do the routing for my tagging system 😉

                Regards,

                Yves

              • #70291
                Jim Kosloskey
                Participant

                  A point about manipulating a message at the Inbound Tps UPoC – whatever changes you make to a message at that UPoC will be effective for EVERY receiving system – even future receiving systems you do not even know about yet.

                  If I am going to use Tcl to manipulate a message I tend to do it at the Route (Pre-Xlate typically). That way I can control what effects happen per receiver.

                  email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.