8 Replies Latest reply on Mar 9, 2017 5:40 PM by chadha RSS
    tcoufal Communicator

    Dif of two infotables

    Hi,

    I would like to accomplish a comparison of two Infotables.

    I have one property, type of Infotable. This property is updated by scheduled event. It could change (it could be one or more new entries in it)

    I am updating the Infotable as whole i.e.:

     

    var tempTable = parseResult();

    Things[myThing].myTable = tempTable;

     

    I would like to have a subscription which would take an old value and new value of that infotable and spit out new/added entries.

     

    I was doing some loop functions, but they are not very effective.

     

    Any ideas?

      • Re: Dif of two infotables
        saeedma Apprentice

        What are some of the functions you have attempted so far? Will there be a constant number of rows in the infotable property our could this vary? Iterating through the tables and comparing the values is the main method that comes to mind.

        • Re: Dif of two infotables
          pchung Collaborator

          Besides what you've tried so far, what isn't effective?

            • Re: Dif of two infotables
              tcoufal Communicator

              Hi Pai,

              I was iterating through the new infotable and using EQfilter on the old one.

              I have almost 1500 Things which they are containing this infotable property. Firstly I had a Scheduler thing with service doing all that work one Thing at the time.

              It took about 20s to complete. There is no performance monitor in Thingworx (which would be great btw) so I dont know if this is a right approach once I'll scale.

              Secondly I had a Subscription service (on DataChange) directly inside all of those Things. Same problem - I cannot tell what does it do for rest of the system. (Is it blocking or non-blocking, every scope running in separate thread or job?) What happen if I scale to lets say 10k Things?


              Performance monitor would be a great tool. I am still afraid that one time it will "bite me".


              What do you suggest?


              Tomas